Should I return 4764 thread to ThreadPool after waiting?
Yes. And so it is.
(However, I do not know how this will look inside the Concurrency Visualizer)
. , , .
:
ThreadPool.QueueUserWorkItem(o =>
{
Console.WriteLine("worker: " + GetNativeThreadId(System.Threading.Thread.CurrentThread));
Thread.Sleep(250);
});
( , , - :)).
, , , .:)
, , Task. , Synchronization, .
. , ? , , . , , . . .
- (, Task) , , , - . , , , - .
, , WaitForSingleObject(), , ReleaseSemaphore().
Synchronization , .