Unfortunately, Semaphore in System.Threading when using the .NET Compact Framework is missing. I'm not sure why this is so, does anyone have an idea?
After googling, I found a bunch of people giving their own implementations, but none of them worked perfectly ... or at all!
So, I came to ask the experts ...
Does anyone have a good semaphore class / library that they can recommend for a .NET compact framework?
OR
Is there any way to emulate behavior?
I have a typical producer / consumer setting in which a thread queues objects (System.Collections). Then I want the consumer stream to pull objects out of the queue and do the work, but obviously only when things work in the queue!
I work in C #, but I will make decisions / pseudo in any language, as long as I can implement it in .NET CF.
source
share