Skip to content

improved graceful + guard support #830

@GlenDC

Description

@GlenDC

So far we have re-exported tokio-graceful (a crate which we maintain). I think it's however time we integrate it directly into a rama-graceful crate that can be imported into core, or perhaps have some in core and some in graceful....

  • What is most common and useful is the ShutdownGuard... This one is nice and a good building block. It should however also be easier to make this for one-shot things. E.g. maybe you want to just create a guard in place and be able to cancel it (cancel-token....). Stuff like that is now not really easily possible without getting awkward
  • you have graceful shutdown, but there's also graceful restart... we really want to be able to suppor the latter as well. Cloudflare recently opensourced https://github.com/cloudflare/ecdysis, we can probably depend on that, or at the very least take inspiration from it. This way graceful can be used for shutdown, but also restart

Any ideas are welcome as well. This will be worked starting somewhere in next weeks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions