this post was submitted on 18 Sep 2023
7 points (73.3% liked)
Rust Programming
8151 readers
7 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Best option is probably to add a wrapper around the thread that re-spawns it. But you can also just catch panics in the loop.
How would you re-run it multiple times then? An internal should be progressively greater. How would you terminate it if it continues to produce an exception?