[Ace-users] [ace-users] ACE_Reactor Thread Exits

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Wed Nov 7 09:56:17 CST 2007


>Running ACE v4.5.1 on Solaris 10

You are using an ANCIENT version of ACE.  Please upgrade to ACE+TAO+CIAO x.6.1 (i.e., ACE 5.6.1, TAO 1.6.1, and
CIAO 0.6.1), which you can download from


under the heading: "Latest Beta Kit."

The DOC groups at Washington University, UC Irvine, and Vanderbilt
University only provide "best effort" support for non-sponsors for the
latest release, as described in


Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out


for a list of companies that will provide you with ACE+TAO commercial

>We are using the ACE_Select_Reactor to manage TCP stream sockets,
>we register an ACE_Event_Handler with the ACE_Reactor to handle each
>Other than the explicit -1 return from a handle_* callback method, hat
>is the correct way to
>subsequently inform the ACE_Reactor that we would like to close a
>given TCP socket?

Please see Chapter 3 of C++NPv1 <www.cs.wustl.edu/~schmidt/ACE/book1/>
for details on how to do this.

>Is it OK to call ACE_Reactor::instance()->remove_handler()
>from a different thread than the thread running the ACE_Reactor event

Yes, that should work fine - assuming you're using the appropriate
type of Reactor (again, see Chapter 3 of C++NPv1 for details).

>It seems like this causes the socket to be closed and then appears as
>EBADF in the ACE_Reactor's select loop.  And if the associated file
>descriptor is quickly reused (e.g. for another socket connection or
>then there is a window where the ACE_Reactor may get confused and exit
>its thread
>from within its check_handles() method.

I recommend you upgrade..


Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu

More information about the Ace-users mailing list