You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the call to p.f.Fd() inside the Port.Flush() sets the file descriptor to blocking mode. Either we should save a reference to the file descriptor in the object field or set the fd back to non-blocking mode after flush is complete.
The text was updated successfully, but these errors were encountered:
elliotmr
added a commit
to elliotmr/serial
that referenced
this issue
Nov 8, 2018
Holy smokes, I just saw that it is specifically setting the file descriptor to be blocking instead of blocking. Is there a specific reason for this?
Just for a little more context, since Go 1.11, if you open an os.File in non-blocking mode, it will add it to the runtime poller and you won't have to sit with a blocked os thread when you call read. This has the added benefit of allowing a concurrent close to the port and it then kicking you out of an active read.
elliotmr
added a commit
to elliotmr/serial
that referenced
this issue
Nov 8, 2018
the call to
p.f.Fd()
inside thePort.Flush()
sets the file descriptor to blocking mode. Either we should save a reference to the file descriptor in the object field or set the fd back to non-blocking mode after flush is complete.The text was updated successfully, but these errors were encountered: