Open slafs opened 5 months ago
Hi.
You are correct, this is a bug. It has been there since the introduction of try_set_handler
. Quite an obvious bug as well, what have I been thinking :)
Actually, I'm taking it back. set_handler
will overwrite whatever handler there was set by something else than this crate, but it will do it just once. try_set_handler
will return MultipleHandlers
if something else than this crate had set a handler for the signal.
The wording for the logic is quite poor as my initial thoughts were too that it's not working properly.
Hello!
Not sure if I'm holding it wrong or... 🤔
The docs for
set_handler
say:and for
try_set_handler
say:But a modified snippet from the README like this:
panics with:
So it seems
set_handler
can return MultipleHandlers? 🤔I'm on OSX 14.4.1