gchp / rustbox

Rust implementation of the termbox library
MIT License
469 stars 48 forks source link

Fix race conditions during stderr redirect. #11

Closed pythonesque closed 9 years ago

pythonesque commented 9 years ago

I had intended to do this before, but forgot about it. Without this, it is possible for bad stderr input to show up when RustBox starts to initialize while other threads panic (it's not memory unsafe, just causes exception spam). I'm not sure whether anyone will actually try to do this, given that RustBox doesn't work on multiple threads, but it's still better to be correct here :)

gchp commented 9 years ago

Cool, thanks!