from ShutdownHandler import ShutdownHandler
shutdown_handler = ShutdownHandler()
def listener_func():
print("Shutdown from signal number: ")
shutdown_handler.add_listener(listener_func)
listener = shutdown_handler.add_listener(
listener=lambda: print("Shutdown from signal number: "),
priority=5
)
assert shutdown_handler.has_listener(listener)
shutdown_handler.remove_listener(listener)
assert not shutdown_handler.has_listener(listener)
Shutdown handler for python
License
NicholasTancredi/ShutdownHandler
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Shutdown handler for python
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published