This class provides a semaphore facility. The implementation requires the accompanying C library uniipclib.so to be on the library path.
Instances of this class should not be created directly, but rather using the factory procedures open_public_sem, create_public_sem and create_private_sem
Class summary |
Methods defined in this class |
attempt() get_id() get_value() remove() semop(n) semop_nowait(n) semop_poll(n, t) set_value(x) signal() wait() |
Variables defined in this class |
id |
Method detail |
Peform a semop with the IPC_NOWAIT flag set. This is the same as semop(), but instead of suspending the call will fail.
Repeatedly peform semop_nowait(), sleeping for a short period between each try until t milliseconds or semop_nowait() succeeds. Fails on a timeout; otherwise succeeds.
Variable detail |