multi-threading

Tony Arcieri tony at clickcaster.com
Mon Jan 28 21:22:42 CET 2008


On Jan 28, 2008 3:51 AM, Marc Lehmann <schmorp at schmorp.de> wrote:

> Or, if you have relatively long-lived connections, you might use a pipe
> per
> thread and wake that other thread up that way.


[... snip ...]

In fact, I could envisage that this functionality (signaling a loop
> asynchronously) could become part of libev proper if there is demand, as
> libev already has to handle asynchronous signals at leats in one loop
> and therefore needs the mechanism already (and that way it could e.g. be
> optimised by using an eventfd or other os-specific means).
>

Something like this would be extremely useful for sending asynchronous
messages across threads.  Rubinius does something like it already, and I'll
be adding something like it to Revactor soon.  If you did implement some
sort of cross-thread signal watcher I'd probably end up using it.

-- 
Tony Arcieri
ClickCaster, Inc.
tony at clickcaster.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.schmorp.de/pipermail/libev/attachments/20080128/72d0b38c/attachment.htm 


More information about the libev mailing list