I use Task
s to run asynchronous operations in .NET.
In order to make a better use of the Threads debugging window, I would like to identify the currently running task by a thread name. However, the Name
property of each thread can only be set once. So the second time the same thread from the pool is used, I'm getting a runtime exception.
Is there any way to get around this?