Skip to content

Easy way #1

@imidoriya

Description

@imidoriya

I haven't tested this and I'm not sure how it would apply to your code (thank you for creating btw), but I was reading further down the thread in the link you posted and there was a post from Dec 2021 on an easier way to do it. Might want to see if this approach works.. make the code a little simpler. Also, it would be nice to allow this to be a decorator on a function.

https://gist.github.com/liuw/2407154?permalink_comment_id=3985783#gistcomment-3985783

As additional info for your readme and the reason I tried your method, other libraries use either signals or mutliprocessing. You mention the issue with signals, but my problem with multiprocessing was 1) you lose shared memory in your threads 2) child processes not closing correctly after the parent is killed (via keyboard interrupt). If this works as I hope, it resolves those issues.

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