[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Signals and priority queues
On Fri, Jan 6, 2012 at 7:24 AM, Ralph Castain <rhc@xxxxxxxxxxxx> wrote:
> If it helps, I have now confirmed that I *can* activate the t2 event during the t1func callback in my example *provided* I called event_assign on it prior to entering event_base_loop. It is also okay for me to event_add the t2 event during the callback - I am simply not allowed to event_assign *and* activate it there.
>
> However, it is okay to assign the event during the callback so long as I don't activate it until after I return.
>
> Seems a little strange to me - is this the intended behavior?
Well, no, of course not.
Looking at your code, the only weird thing I see at first glance is
that you are calling event_add() on t1 and t2 -- you shouldn't be
doing that. event_add() is only for events that you want libevent to
poll or wait for, but waiting for EV_WRITE on fd -1 isn't
well-defined. If you want to activate them yourself with
event_active(), there's no need to event_add() them.
That shouldn't be causing this problem, though, I think. (Unless it is?)
I just tried your test programs, though, and they worked okay for me
on OSX and linux, using Libevent 2.0.13-stable and Libevent
2.0.14-stable.
What platform are you running your tests on? Have you tried other
platforms too? Does the outcome depend on which libevent backend is
in use? Have you tried this with an unpatched Libevent, just to
confirm that it's not introduced by any openmpi patches?
yrs,
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.