Files
meshcore-open/third_party/flserial/macos
Aleksandrs Sevastjanovs bb7a15f436 Stop flserial's SerialThread spinning on an idle serial port
POSIX opens the port O_NONBLOCK with VMIN/VTIME=0, and fl_open skips
setTimeout on Linux/macOS, so the default all-zero Timeout makes
SerialThread's read() return immediately. With no traffic the reader
spins at 100% of a core for the whole session. Release builds and a
minimized window do not help because it is a native thread.

Set a 10 ms read/select timeout on POSIX. Data still wakes select
immediately; the timeout only bounds idle wakeups and queued-write
latency. Apply the same change to the macOS copy of flserial.

Follow-up to #557.

Measured with a PTY harness, idle: 99.9% of one core before, 0.2%
after. RX and TX still pass.
2026-10-30 16:15:15 +00:00
..