// $Id$ #include "ace/FlReactor.h" ACE_RCSID(ace, FlReactor, "$Id$") #if defined (ACE_HAS_FL) #include /**/ ACE_ALLOC_HOOK_DEFINE (ACE_FlReactor) // Must be called with lock held ACE_FlReactor::ACE_FlReactor (size_t size, int restart, ACE_Sig_Handler *h) : ACE_Select_Reactor (size, restart, h) { // When the ACE_Select_Reactor is constructed it creates the notify // pipe and registers it with the register_handler_i() method. The // FlReactor overloads this method BUT because the // register_handler_i occurs when constructing the base class // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i() // is called not the FlReactor register_handler_i(). This means // that the notify pipe is registered with the ACE_Select_Reactor // event handling code not the FlReactor and so notfications don't // work. To get around this we simply close and re-opened the // notification handler in the constructor of the FlReactor. #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) this->notify_handler_->close (); this->notify_handler_->open (this, 0); #endif /* ACE_MT_SAFE */ } ACE_FlReactor::~ACE_FlReactor (void) { } // This is just the from ace/Reactor.cpp // but we use the Fl functions to wait for an event, not , just use the Fl mechanism // to wait for one or more events... // Wait for something to happen. double t = 0; if (max_wait_time != 0) t = max_wait_time->sec () + max_wait_time->usec () / 1000000.0F; while (t > 0) { t = Fl::wait (t); } // Reset the width, in case it changed during the upcalls. width = this->handler_rep_.max_handlep1 (); // Now actually read the result needed by the // using