dragon.mpbridge.synchronize.DragonSemaphore
- class DragonSemaphore
Bases:
Semaphore
A sempahore co-located on the same node by default as the creating process
- __init__(*args, ctx, **kwargs)
Create a Semaphore object that can be shared across Dragon processes.
Methods
__init__
(*args, ctx, **kwargs)Create a Semaphore object that can be shared across Dragon processes.
acquire
([blocking, timeout])Acquire the Semaphore, decrementing the counter, blocking other processes when the counter is decremented to 0.
Get the value of the internal counter without acquiring the Semaphore.
release
([n])Release the Semaphore, incrementing the internal value by n, thus unblocking up to n processes.
- __init__(*args, ctx, **kwargs)
Create a Semaphore object that can be shared across Dragon processes.