|
@CecileTonglet | |||||
|
I got really great help and I almost managed to do what I wanted! Thanks! I will share the solution as soon as I have something I'm 100% sure is working as intended
|
||||||
|
||||||
|
Cecile Tonglet 🦀
@CecileTonglet
|
17. sij |
|
I'm having a hard time to find a simple example of using async with tokio in #rustlang I want to make something that catches signals and end the process (without killing it)
|
||
|
|
||
|
Carl DB
@carllerche
|
17. sij |
|
Best strategy right now is to use `futures::select!` with one branch being the work to do and the other being `signal::ctrl_c()` (or whatever signal). Feel free to ask Qs in discord.gg/tokio.
|
||
|
|
||
|
Cecile Tonglet 🦀
@CecileTonglet
|
18. sij |
|
It finally works! This how you can wrap your async app so it catches INT and TERM signals and exit gracefully pic.twitter.com/EhDHNCsYYU
|
||
|
|
||
|
Cecile Tonglet 🦀
@CecileTonglet
|
18. sij |
|
|
||