Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does __del__ ever actually get called? #17

Open
EternityForest opened this issue Jun 10, 2024 · 0 comments
Open

Does __del__ ever actually get called? #17

EternityForest opened this issue Jun 10, 2024 · 0 comments

Comments

@EternityForest
Copy link

EternityForest commented Jun 10, 2024

It seems like the socket thread holding a reference to the callback prevents del from being called, which means the thread never stops unless you manually call terminate() explicitly, and you get a thread leak.

And when you do call it explicitly, it sometimes stops with a nuisance error when the thread tries to read the closed socket. I work around that by changing the "while True" to "while self.should_run" and setting that to False to stop the loop before shutting down the socket and process.

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

No branches or pull requests

1 participant