[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Clarify new behavior?
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] Clarify new behavior?
- From: Ralph Castain <rhc@xxxxxxxxxxxx>
- Date: Sat, 23 Oct 2010 03:14:18 -0600
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sat, 23 Oct 2010 05:14:30 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=Qqp1jwA1T8IGOFphW9qAsS/NxeqiNonaymT7iRnY+uQ=; b=Hol9vO0JS7nDMxBctiQdITkXLKl+SmIB2/eRQSNN602PwHuD4dELdPGSQAyhE73CdR WHwZqEIlAN1Ch7VAj6WgxF16XU9/HSOZ52xkQu7a5SxEkWPxS02asDfaz+fQgYqQ4aK5 RG5NWRk0CbPNAH4jr5EbtdqqMWX2RSXAkup8Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:content-type:content-transfer-encoding:subject:date :message-id:to:mime-version:x-mailer; b=hV0J9Iw+JgvOivGSbyxW4+kEHOSz6mPIDG8GrBr6saTX4G46bejvaNo7iSN2aLpEDv mA9tV7RpusL28WsPF4ypFFaAB8Hp7EX5p1NDu1Tyba2yQp7wRHrIVMM80xfsJDxZ/4U+ YcKLmBIAqP1ysnhxk1i1czr06OpjDRa9RD05E=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Hi folks
I successfully updated our libevent integration in Open MPI, but have encountered a problem with one use-case that used to work and now doesn't. Before proceeding to devise a fix, I just wanted to confirm that I accurately understand the issue.
The problem arises from this scenario:
1. we receive a command via a message that we receive in a file descriptor event. We "push" the command message into a timer event (duration zero time) to help break a threading issue, and then return from the file descriptor event.
2. the event library is called with LOOP_ONCE, causing the timer event to fire.
3. from within the timer event, the command causes us to execute a procedure that results in us having to wait for another event to occur. We "block" in that position, running a loop that includes a call to progress the event library (i.e., a call to event_loop(LOOP_ONCE)).
This last step used to work just fine, yet now yields the following warning:
warn] event_base_loop: reentrant invocation. Only one event_base_loop can run on each event_base at once.: Resource temporarily unavailable
and no progression of the event library occurs.
I can see a few ways around this problem, but all involve considerable code rewrite. Before I do so, I just wanted to confirm my understanding that this behavior changed (i.e., recursion is no longer allowed), and see if any alternative approaches to revising such codes are recommended.
Thanks
Ralph
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.