[Python-checkins] python/dist/src/Lib/test test_logging.py,1.7,1.8
bcannon@users.sourceforge.net
bcannon@users.sourceforge.net
Tue, 29 Apr 2003 22:32:34 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv3765/Lib/test
Modified Files:
test_logging.py
Log Message:
Change from a threading.Condition object to a threading.Event object for
signalling when the TCP server is done. Should hopefully solve hanging
issues for Solaris 8 & 9. Solves the apparent hanging issue with OS X.
Closes patch #729988 .
Index: test_logging.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_logging.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_logging.py 26 Apr 2003 00:21:31 -0000 1.7
--- test_logging.py 30 Apr 2003 05:32:32 -0000 1.8
***************
*** 89,93 ****
logger.handle(record)
! socketDataProcessed = threading.Condition()
class LogRecordSocketReceiver(ThreadingTCPServer):
--- 89,94 ----
logger.handle(record)
! # The server sets socketDataProcessed when it's done.
! socketDataProcessed = threading.Event()
class LogRecordSocketReceiver(ThreadingTCPServer):
***************
*** 116,122 ****
abort = self.abort
#notify the main thread that we're about to exit
! socketDataProcessed.acquire()
! socketDataProcessed.notify()
! socketDataProcessed.release()
def process_request(self, request, client_address):
--- 117,121 ----
abort = self.abort
#notify the main thread that we're about to exit
! socketDataProcessed.set()
def process_request(self, request, client_address):
***************
*** 468,474 ****
finally:
#wait for TCP receiver to terminate
- socketDataProcessed.acquire()
socketDataProcessed.wait()
- socketDataProcessed.release()
for thread in threads:
thread.join()
--- 467,471 ----