SharedBarrier#
- class streaming.base.shared.SharedBarrier(filelock_path, shm_name)[source]#
A barrier that works inter-process using a filelock and shared memory.
We set the number of processes (and thereby initialize num_exit) on the first time this object is called. This is because the object is created in a per-rank process, and called by worker processes.
- Parameters:
- property flag#
Get property flag.
- Returns:
bool – The flag value.
- property num_enter#
Get property num_enter.
- Returns:
int – Number of processes that have entered the barrier.
- property num_exit#
Get property num_exit.
- Returns:
int – Number of processes that have exited the barrier.