parameters: (self, parties, action=None, timeout=None)
docstring: Create a barrier, initialised to 'parties' threads.
  
          'action' is a callable which, when supplied, will be called by one of
          the threads after they have all entered the barrier and just prior to
          releasing them all. If a 'timeout' is provided, it is used as the
          default for all subsequent 'wait()' calls.
docstring_summary: Create a barrier, initialised to 'parties' threads.
docstring_tokens: Create a barrier initialised to parties threads .
function: def __init__(self, parties, action=None, timeout=None):
          """Create a barrier, initialised to 'parties' threads.
  
          'action' is a callable which, when supplied, will be called by one of
          the threads after they have all entered the barrier and just prior to
          releasing them all. If a 'timeout' is provided, it is used as the
          default for all subsequent 'wait()' calls.
  
          """
          self._cond = Condition(Lock())
          self._action = action
          self._timeout = timeout
          self._parties = parties
          self._state = 0  # 0 filling, 1 draining, -1 resetting, -2 broken
          self._count = 0
function_tokens: def __init__ ( self , parties , action = None , timeout = None ) : self . _cond = Condition ( Lock ( ) ) self . _action = action self . _timeout = timeout self . _parties = parties self . _state = 0 # 0 filling, 1 draining, -1 resetting, -2 broken self . _count = 0