I dig into the repo you mentioned, TBHonnest, im not that wise, and it 
remains unclear.
For the few i know, select is the approach to take, but the API is unclear.

Not sure if it s possible to come up with something as straight as 
`NewReader(os.Stdin).Block(false).Read()`



Le mercredi 31 août 2016 23:58:49 UTC+2, adon...@google.com a écrit :
>
> On Wednesday, 31 August 2016 07:48:12 UTC-4, Dave Cheney wrote:
>>
>> Unfortunately POSIX does not guarantee that close from one thread will 
>> unblock another.
>
>
> To read from a file without waiting longer than a specified time, you need 
> to use the POSIX 'select' system call, which you can find at 
> syscall.Select.  (It was the inspiration for the Go select statement, but 
> whereas Go's select multiplexes channels, POSIX's select multiplexes 
> files.)  The select system call is quite a pain to use in Go; you might 
> want to take a look at https://github.com/creack/goselect.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to