Problem with cross-thread semaphore release [2005]
Hi all,
I try to use semaphores in .NET.
After using .Waitone in the first thread code, I used .Release in the second thread code in order to resume the suspended first thread. For a couple of times it ran and worked for me, but there is a time when I can't figure out what makes it stop.
The steps as I see them while debugging:
First thread : .Waitone -> I saw it happening.
Second thread : .Release ( First thread suspended )-> I saw it happening;
BUT: The first thread didn't get out of its suspeneded mode.
I can't bring any code here soon, but I'll sure manage with some tips and directions, from anyone of you, which can lead me to a solution for my problem. :confused:
Re: Problem with cross-thread semaphore release [2005]
Without code, im not sure it is possible to answer your question, but maybe some of the more experienced guys might know.
Cheers
Re: Problem with cross-thread semaphore release [2005]
It sounds like a deadlock, and even WITH code it will be tough to debug. You say that you "saw it happening". How are you doing that?