code: async def put(self, item):
          
          self._parent._check_closing()
          async with self._parent._async_not_full:
              self._parent._sync_mutex.acquire()
              locked = True
              try:
                  if self._parent._maxsize > 0:
                      do_wait = True
                      while do_wait:
                          do_wait = (
                              self._parent._qsize() >= self._parent._maxsize
                          )
                          if do_wait:
                              locked = False
                              self._parent._sync_mutex.release()
                              await self._parent._async_not_full.wait()
                              self._parent._sync_mutex.acquire()
                              locked = True
  
                  self._parent._put_internal(item)
                  self._parent._async_not_empty.notify()
                  self._parent._notify_sync_not_empty()
              finally:
                  if locked:
                      self._parent._sync_mutex.release()
docs: Put an item into the queue.
  
          Put an item into the queue. If the queue is full, wait until a free
          slot is available before adding item.
  
          This method is a coroutine.