How should I react if ThreadPool.QueueUserWorkItem () returns FALSE?

I am using ThreadPool.QueueUserWorkItem() . From MSDN, I see that it can return FALSE if the queue was unsuccessful. How should I react then? Wait a moment and try to queue again, hoping that the thread from the pool will be available then?

+7
source share
2 answers

This game is over. Let your user know what happened and stop your application.

+5
source

It is unlikely to return false (see here: When ThreadPool.QueueUserWorkItem returns false ). If so, consider it a failure and do not continue to try again.

You will usually get a NotSupportedException .

+2
source

All Articles