Print

Print


@abh3 requested changes on this pull request.

Just comment changes are needed. Presumably the code was tested with the "sleeps" that caused it to fail and now it doesn't fail, right? The only other suggestion is consider repackaging the "eventfd' processing into a separate class so that it can be used elsewhere should the need arise.

>     if (PollDfd >= 0) close(PollDfd);
 }
-  
+
+/******************************************************************************/
+/*                              A d d E v e n t F d                           */

This should be AddWaitFD (looks like you must have changed your mind at some point).

> @@ -164,6 +194,44 @@ void XrdPollE::Exclude(XrdPollInfo &pInfo)
 // Forcibly remove the link from the poll set
 //
    remFD(pInfo, 0);
+
+// Wait to make sure the poll thread has completed handling the last set of
+// events which may have included this Link. The handing includes examining the
+// Link's PollInfo before deciding if to schedule the Link. After we return,
+// the PollInfo may be reset and the Link could be subsequently reused.
+//
+   WaitPoller();
+}
+
+/******************************************************************************/
+/*                          H a n d l e E v e n t F d                         */

This should be HandleWaitFD

>        } while(1);
 }
 
+/******************************************************************************/
+/*                             W a i t E v e n t F d                          */

This should ne WaitPoller (perhaps a better name would be Wait4Poller)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1941#pullrequestreview-1327584058
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1