1b760a82af99fbfe5a084c31231d4fdb0ef8df9f
The only way to interrupt running Read() method of io.Reader is to call Close from another goroutine. What happens is that go runtime builtin race detector complains about unsynchronised access to "opened" member, which is set in Close and checked in Read. It doesn't seem to be dangerous, but 1) you never know, and 2) it makes your life more difficult when you need to debug some other data races in a complex project that uses serial. Proposed fix changes simple access to "opened" to atomic operations. It's also supposed to fix #38
go.bug.st/serial
A cross-platform serial library for go-lang.
Documentation and examples
See the godoc here: https://godoc.org/go.bug.st/serial
go.mod transition
This library now support go.mod with the import go.bug.st/serial.
If you came from the pre-go.mod era please update your import paths from go.bug.st/serial.v1 to go.bug.st/serial to receive new updates. Anyway, the latest "v1" release should still be avaiable using the old import.
License
The software is release under a BSD 3-clause license
Description
Languages
Go
100%