[Ace-users] ACE_Reactor Thread Exits

BlueJayWay sgrsgrsgr at gmail.com
Wed Nov 7 09:04:46 CST 2007

Running ACE v4.5.1 on Solaris 10

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?

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

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.


More information about the Ace-users mailing list