eigenein / my-iot-rs

Yet another home automation (alpha)
https://eigenein.github.io/my-iot-rs/html
MIT License
32 stars 5 forks source link

Controlling panicking service threads #1

Closed eigenein closed 5 years ago

eigenein commented 5 years ago

If Service.run panics, we may want to restart service (probably with exponential backoff).

https://doc.rust-lang.org/stable/edition-guide/rust-2018/error-handling-and-panics/controlling-panics-with-std-panic.html

eigenein commented 5 years ago

catch_unwind doesn't play nice with the Service.run parameters. It was decided that panics should never occur, and if that happens – then it should be fixed properly