File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ def full(self):
4444 return n
4545
4646 def put (self , item ):
47- """Put an item into the queue."""
47+ """Put an item into the queue.
48+
49+ If the queue is full, block until a free slot is avaiable.
50+ """
4851 self .fsema .acquire_lock ()
4952 self .mutex .acquire_lock ()
5053 was_empty = self ._empty ()
@@ -57,6 +60,7 @@ def put(self, item):
5760
5861 def get (self ):
5962 """Gets and returns an item from the queue.
63+
6064 This method blocks if necessary until an item is available.
6165 """
6266 self .esema .acquire_lock ()
@@ -74,6 +78,7 @@ def get(self):
7478 # raise Empty if the queue is empty or temporarily unavailable
7579 def get_nowait (self ):
7680 """Gets and returns an item from the queue.
81+
7782 Only gets an item if one is immediately available, Otherwise
7883 this raises the Empty exception if the queue is empty or
7984 temporarily unavailable.
You can’t perform that action at this time.
0 commit comments