def __exit_handler(signum, frame):
"""
Let the worker go. This doesn't do much of anything because it's
called from inside a signal handler.
"""
#print "EH START"
with this.lock:
exit_barrier = this.exit_barrier
if exit_barrier is not None:
# Meet up with the worker
this.exit_barrier.wait()
#print "EH FIRST BARRIER"
# Wait for the worker to be done
this.finish_barrier.wait()
#print "EH HANDLER FINISHED"
#print "EH DONE"
sys.exit(0)
评论列表
文章目录