r/Python • • Nov 25 '22

Intermediate Showcase defer in python!

https://github.com/dankeyy/defer.py

stupid but works lol hope you like it

303 Upvotes

62 comments sorted by

View all comments

Show parent comment

1

u/nxtfari Nov 25 '22

Maybe dumb question can you just pair it with signal/atexit to cover all possible cases?

edit: ah i think you would have to have a seperate process to do this. You can atexit for SIGTERM but not SIGKILL