class_docstr: Defines a simple barrier class to synchronize on a particular event.
class_docstr_tok: ["Defines","a","simple","barrier","class","to","synchronize","on","a","particular","event","."]
docstr: Waits on the barrier until all threads have called this method.
docstr_tok: ["Waits","on","the","barrier","until","all","threads","have","called","this","method","."]
code: def wait(self):
      """Waits on the barrier until all threads have called this method."""
      with self._cond:
          self._count += 1
          self._cond.notifyAll()
          while self._count < self._num_threads:
              self._cond.wait()
  
file_path: acme/acme/utils/counting_test.py
imports: import threading
  from acme.utils import counting
  from absl.testing import absltest
label_desc: Use image node_id 2 for calling the Barrier obj's underlying member method code with example usage: obj.wait() without return types