Skip to content

Does __del__ ever actually get called? #17

@EternityForest

Description

@EternityForest

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions