Skip to content
This repository was archived by the owner on Mar 24, 2021. It is now read-only.

Conversation

ltucker
Copy link

@ltucker ltucker commented Sep 18, 2015

No description provided.

yungchin and others added 8 commits September 7, 2015 16:15
This fixes a problem where, because RequestHandler instances registered
themselves with atexit, they would always live until program exit.

Having replaced the atexit call with the more usual __del__ finaliser, I
found that this __del__ would never run: the queue-handling thread
instantiated by RequestHandler holds references to self.  Having also
replaced that ref by a weakref, we did get the finaliser to run.

Finally, to make sure we don't block on Queue.get() forever (in which
case the thread still doesn't die), this also adds a timeout to that.

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Small addition to the parent commit.  I figured we might also benefit
from a log line in RequestHandler.stop, since it took a while to realise
that might hang (see #218).

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
@ltucker
Copy link
Author

ltucker commented Sep 18, 2015

oops this was just internal not an actual PR against your master

@emmettbutler
Copy link
Contributor

@ltucker if you do end up with something you think the project would benefit from, please do PR it! I've been deep in the weeds of #254, but I'll be reviewing a bunch of pull requests once that's done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants