code: def put(self, obj=None):
          
          _vv and IOLOG.debug('%r.put(%r)', self, obj)
          self._lock.acquire()
          try:
              if self.closed:
                  raise LatchError()
              self._queue.append(obj)
  
              if self._waking < len(self._sleeping):
                  wsock, cookie = self._sleeping[self._waking]
                  self._waking += 1
                  _vv and IOLOG.debug('%r.put() -> waking wfd=%r',
                                      self, wsock.fileno())
                  self._wake(wsock, cookie)
              elif self.notify:
                  self.notify(self)
          finally:
              self._lock.release()
docs: Enqueue an object, waking the first thread waiting for a result, if one
          exists.
  
          :param obj:
              Object to enqueue. Defaults to :data:`None` as a convenience when
              using :class:`Latch` only for synchronization.
          :raises mitogen.core.LatchError:
              :meth:`close` has been called, and the object is no longer valid.