How to wait/block until a semaphore value reaches 0 in windows -
Using the Sim () function on Unix, it is possible to provide a standard structure with sem_op = 0. Basically this means that the calling process will stop / block unless the value of the sackfire becomes zero, is there a uniform way to achieve it in windows?
In the case of specific use, I am trying to apply it, before waiting for the number of readers to reach zero before writing the authors. (Yes, this is some unconventional way to use straightforward, because there is no limit to the number of readers and therefore there is no set of constrained resources that symphars are usually used for management).
The documentation can be found here on the Unix Simp system call:
Assume that you have a The author is the thread, the writer is the thread that boiled the semaphore, though Afor hold through the waitForSingleObject
, however many times you started Sakram count.