keltia / fetiche-rs

Rust crates for managing Surveillance data — ingress/egress formats for ECTL
MIT License
1 stars 1 forks source link

Move worker into a thread, not the other way around #10

Closed keltia closed 1 year ago

keltia commented 1 year ago

Right now, we exit() from the sleeper thread when the time expire, that is bad. No library should ever finish a process (unless it is a panic). Move the work into a thread with the outer part being the data gathering part.

We might want to get full async at some point, tokio makes it simplier.

Ctrl-C handling in Windows is, as expected, broken.

keltia commented 1 year ago

Fixed in 1f0321adca17a41830db12992541694a530954c0.