Correct. We use the event library (a customized drop of libevent) for
three main things:
1. monitoring file descriptors
2. scheduling timed callbacks (i.e., you can set a callback to fire at
some point in the future)
3. monitoring signals
You can register a callback to occur when these events happen. For
signals, your callback will be called in regular context, not signal
context.
Orte uses #2 heavily, for example, to "schedule" things to happen
outside of the current context. E.g., a message just arrived. But we
don't want to process it in the middle of a callback from the fd read
event, so ORTE will schedule an event 0 seconds from now. That
callback will then occur from the "top level" and not create a nasty
daisy chain of callbacks invoking callbacks. And so on.
Make sense?
On Apr 3, 2009, at 6:36 AM, Timothy Hayes wrote:
Do you mean the code in OPAL/event? If so, it's a customised
libevent. I've seen it used in OpenMPI to poll/select open sockets,
it allows the programmer register their own callback functions for
when this happens. Just ignore me if this wasn't what you were
asking about though :-)
Tim
2009/4/3 Eugene Loh <eugene....@sun.com>
What is the purpose of the event library? I'd happily RTFM if
someone could point me in that direction! :^)
I'm guessing it's to check occasionally for "unexpected events", but
if someone could confirm/deny and flesh that picture out a little,
I'd appreciate it.
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel
--
Jeff Squyres
Cisco Systems