Closed Sword-Smith closed 1 year ago
Are you aware of specific non unwind safe cases in the code?
I probably wouldn't have been so cautious to do it otherwise, but the code looks good to me and I don't think it would cause any harm, so why not (especially since it's done already 😄).
Are you aware of specific non unwind safe cases in the code?
I actually can't answer that as I don't really know what it means :/
I was just thinking that I wanted to provide a callback function in case the peer_loop
thread panicked. Such that the part of the global state that keeps track of connected peers can be correctly updated.
This should ensure that the peer map is always up-to-date even if a peer-loop panics, which shouldn't be possible.