dalance / termbg

A Rust library for terminal background color detection
Apache License 2.0
80 stars 5 forks source link

Release stdin if unable to get background #5

Closed kunalmohan closed 3 years ago

kunalmohan commented 3 years ago

termbg should release stdin if unable to get background colour for xterm. Currently, it returns an error, but the thread querying the colour continues to hold onto stdin and runs in the background. This does not let other threads lock on stdin.

dalance commented 3 years ago

Thank you for your report. I tried to change from background thread to async-std to fix it. Could you try https://github.com/dalance/termbg/commit/fed9852c08737ab86010acc1f577be99388440e6 ?

kunalmohan commented 3 years ago

Yeah, its working for me.

dalance commented 3 years ago

Thanks! I released v0.3.0.

kunalmohan commented 3 years ago

Thanks!!