gchp / rustbox

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

Thread safety #81

Closed jmacdonald closed 6 years ago

jmacdonald commented 6 years ago

As mentioned here, Termbox is partially thread safe. This PR synchronizes access to Termbox's input/output streams so that it can be shared safely across threads.

The primary use case for this is for applications with a thread that blocks on input, with another thread that renders output to the screen.

jmacdonald commented 6 years ago

@gchp the build failures are related to Rust 1.8 support; is there an explicit version you want to support, or is latest stable enough? If so, we can change travis.yml to reflect that.

gchp commented 6 years ago

@jmacdonald latest stable is enough. It's just been a while since I looked at the travis config

gchp commented 6 years ago

@jmacdonald I just updated the config. Can you rebase this to pick it up?

jmacdonald commented 6 years ago

@gchp all set!

gchp commented 6 years ago

@jmacdonald thanks! Just left one comment, more for clarification for myself than anything else.

jmacdonald commented 6 years ago

That ought to do it; let me know if there's anything else!

gchp commented 6 years ago

Great! Thanks again for this.