rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.89k stars 914 forks source link

Ignore mutex poisoning in X11_BACKEND #3885

Closed notgull closed 3 months ago

notgull commented 3 months ago

A panic doesn't really put any of the fields in XConnection into an invalid state, so there is no real reason to panic when poisoning is detected. So just ignore the poison.

Closes #3870

L3P3 commented 3 months ago

Any idea why this error could occur? Do I understand correctly that mutex poisoning might only happen if another thread panics? Why would we handle panics this way instead of handling the panic itself (I have not seen any other panic before)?

kchibisov commented 3 months ago

The thread is running outside of the winit itself, since winit doesn't spawn any threads at all, so where it happens is not our responsibility.