def __init__(self, n_procs):
        """
        Create a barrier that waits for n_procs processes.

        :param n_procs: The number of processes to wait for.
        """
        self.n_procs = n_procs
        self.count = multiprocessing.Value('i', 0, lock=False)
        self.cvar = multiprocessing.Condition()
def __init__ ( self , n_procs ) : self . n_procs = n_procs self . count = multiprocessing . Value ( 'i' , 0 , lock = False ) self . cvar = multiprocessing . Condition ( )
Create a barrier that waits for n_procs processes.

        :param n_procs: The number of processes to wait for.