Get test_logging to not hang when running under regrtest.py -R ::

Not sure why/how _handlers/_handlerList is out of sync.  This could
indicate a deeper problem.

In test_logging, the only absolutely necessary change to get working
was tcpserver.abort = 1.  But we don't want to wait infinitely
to join the threads, so give a 2.0 second timeout.

There doesn't appear to be a need for a local abort variable
in serve_until_stopped, so just use the instance member.

Note the problem is only on HEAD, not in 2.4.
This commit is contained in:
Neal Norwitz 2006-02-05 08:21:08 +00:00
parent 0e6bc8c260
commit 55cd82fe0a
2 changed files with 6 additions and 5 deletions

View file

@ -671,7 +671,8 @@ class Handler(Filterer):
#get the module data lock, as we're updating a shared structure.
_acquireLock()
try: #unlikely to raise an exception, but you never know...
del _handlers[self]
if _handlers.has_key(self):
del _handlers[self]
_handlerList.remove(self)
finally:
_releaseLock()