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

Easy way #1

Open
imidoriya opened this issue Feb 16, 2022 · 1 comment
Open

Easy way #1

imidoriya opened this issue Feb 16, 2022 · 1 comment

Comments

@imidoriya
Copy link

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.

@dr-luke
Copy link
Owner

dr-luke commented Feb 17, 2022

Thank you for this update, I will have to look into this further and update the code/read me accordingly. I will update you when I get a chance, it seems promising though.

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

2 participants