N
Nadav
What is the C# Semaphore equivalent? I can't find any... is there an
equivalent????
Nadav
equivalent????
Nadav
Nadav said:What is the C# Semaphore equivalent? I can't find any... is there an
equivalent????
Nadav said:Well, That's rights, but I don't need to imitate the semaphore functionality
I need to be sure that the CLR uses the exact implementation used by the
Win32 Semaphore logic, e.g. any thread can decrease the reference count of a
semaphore, the owning thread WILL BLOCK on repeating acquisitions of the
semaphore ( in contrast to mutex ), ...
Does the Monitor object supports the features just mentioned?
Nadav said:Well, That's rights, but I don't need to imitate the semaphore functionality
I need to be sure that the CLR uses the exact implementation used by the
Win32 Semaphore logic, e.g. any thread can decrease the reference count of a
semaphore, the owning thread WILL BLOCK on repeating acquisitions of the
semaphore ( in contrast to mutex ), ...
Does the Monitor object supports the features just mentioned?
Nadav.
Jay B. Harlow said:Nadav,
As Jon stated, you can build a Semaphore using Monitor & some of your own
code.
If you want a Win32 Semaphore, you can use P/Invoke and use a Win32
Semaphore. If I went the P/Invoke method I would consider deriving from
System.Threading.WaitHandle to allow my Semaphore to "place nice" with the
rest of the framework.
Hope this helps
Jay
ofNadav said:Well, That's rights, but I don't need to imitate the semaphore functionality
I need to be sure that the CLR uses the exact implementation used by the
Win32 Semaphore logic, e.g. any thread can decrease the reference count