FAQ
Okay, I was thinking in the context of network communication, which is
where I have often exercised the logic suggested.

For local file descriptors, the situation is indeed less clear when you
want to interact with serial buses or the such. That said, the amount of
boilerplate I had to figure out for having a serial line properly working
from Go [1] was in itself a much more time consuming task than figuring how
to close the file descriptor without races. I'm not saying what you suggest
is not a problem, but it's a tiny part of having things working at all in
those scenarios.

[1] With a thermal printer, in that case.
On Mon Oct 27 2014 at 4:09:40 PM Nick Patavalis wrote:


On Monday, October 27, 2014 8:04:03 PM UTC+2, Gustavo Niemeyer wrote:

In fact, I was looking at the os package, but netFD in the net package
seems to be well behaved in this case, even when facing concurrency.

Yes, netFD is a totally different beast. All these problems are solved for
network connections. It also provides a very robust implementation for
reading / writting with timeouts and more...

/npat

--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 22 of 28 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 26, '14 at 9:10a
activeOct 27, '14 at 7:01p
posts28
users6
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase