Skip to content

Gracefully ends a Tokio-based application upon receiving a signal

License

Notifications You must be signed in to change notification settings

iliana/safeword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safeword

Safeword is a library for gracefully ending a Tokio-based application upon receiving a signal.

This could be useful for cleaning up after a program cleanly exits. For example, you might have a server that listens on a Unix domain socket, which does not automatically delete the socket path after the object is dropped. You can run your application with Safeword::run instead of tokio::run and know whether your application was asked to stop, or stopped for another reason (such as the future finishing earlier than you expected).

See the examples for how this might be usefully used.

About

Gracefully ends a Tokio-based application upon receiving a signal

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages