On 21/02/2011 20:29, Kevin Tew wrote:
I've just pushed tewk/select, which contains a non-blocking support for
linux.
I really want to see rakudo get some non-blocking IO features, hence I
started with parrot.

I'd like to merge this sooner than later,
So constructive patches, commits, pull requests to tewk/select are welcome.

I like the update/remove methods because they work with other event mechanisms, too. The getfd, getmaxfd and get_data_hash are specific to select on UNIX, but afaics they're only needed for completeness and testing.

The ability to associate arbitrary data PMCs with an fd also seems useful. But how am I supposed to get the FileHandle PMC from the returned data PMC? It might be better to introduce an additional "Event" PMC type that contains the FileHandle, the r/w/e flags, and user-defined data. Then you would only have to pass this PMC to update/remove. See the event struct in libevent, for example.

Nick
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to