angri 1b760a82af allow Close() to be called from other goroutine than Read
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
2020-04-19 01:12:48 +02:00
2019-12-02 19:51:36 +01:00
2019-12-02 19:51:36 +01:00
2019-12-02 19:51:36 +01:00
2019-12-02 19:27:10 +01:00
2019-12-03 17:03:28 +01:00
2017-03-09 11:47:38 +03:00

Build Status

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

https://github.com/bugst/go-serial/blob/v1/LICENSE

Description
No description provided
Readme BSD-3-Clause 371 KiB
Languages
Go 100%