Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb08066

Browse files
committed
The usual
1 parent c6a681a commit bb08066

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/dos-8x3/queue.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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.

Lib/dos-8x3/socketse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ def setup(self):
396396

397397
def finish(self):
398398
self.wfile.flush()
399+
self.wfile.close()
400+
self.rfile.close()
399401

400402

401403
class DatagramRequestHandler(BaseRequestHandler):

0 commit comments

Comments
 (0)