Unfortunately I don't think this works if you want to do something like 
poll stdin, skipping EOFs in a non-busy-waiting pattern.

A simple poll() in C works fine for this, but I can't figure out how do 
this this in Go because it does not provide a poll.

Maybe I'm missing something.

Mike

On Thursday, September 22, 2011 at 8:04:56 AM UTC-4, André Moraes wrote:
>
> > Hello, again! If i need to poll some fd to changes, what function i need 
> to
> > use ?
>
> In most cases you should not need to poll explicity.
> Write a goroutine that blocks while reading the contents of your fd
> (file, network, etc...), and then send the data read across a channel.
>
> Under the hood Go will take care of the poll for you.
>
> But if you really need to poll explicitly, I can't help you since I
> never had to do that.
>
>
> -- 
> André Moraes
> http://andredevchannel.blogspot.com/
>
>

-- 
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