standardsemiconductor / serialport

Cross platform Haskell library for using the serial port
https://hackage.haskell.org/package/serialport
Other
4 stars 8 forks source link

Greatly simplify the POSIX handle code #2

Closed dopamane closed 3 years ago

dopamane commented 3 years ago

This change allows hOpenSerial to produce a fully functional Handle that can be used with functions such as hWaitForInput. This means a thread can block waiting for input instead of continually polling.

Only the POSIX implementation has been updated. Someone with access to a Windows machine should see if this can be implemented there too.