mirror of
https://github.com/sbt/sbt.git
synced 2026-09-04 08:45:56 +02:00
**Problem** There's a race condition between per-byte readSystemIn notification and one-byte-read thread lifecycle. Note: One-byte-read thread was introduced as a solution to the problem that switching the terminal between raw and canonical mode cannot happen if it's blocked by read. **Solution** This eliminates the thread lifecycle issue by keeping the thread alive throughout the lifecycle of sbtn itself. read is still called on demand by the server readSystemIn notification.