Changeset 11337


Ignore:
Timestamp:
07/11/11 11:09:45 (13 years ago)
Author:
tbretz
Message:
Set the CommandStates_t back to the previous values; updated ResetThread
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventBuilderWrapper.h

    r11324 r11337  
    701701    enum CommandStates_t // g_runStat
    702702    {
    703         kAbort      = -40,  // quit as soon as possible ('abort')
    704         kExit       = -30,  // stop reading, quit when buffered events done ('exit')
    705         kReset      = -20,  // Like EXIT but without closing files and sockets
    706         kStop       = -10,  // Like ABORT but without closing files and sockets
     703        kAbort      = -2,   // quit as soon as possible ('abort')
     704        kExit       = -1,   // stop reading, quit when buffered events done ('exit')
    707705        kInitialize =  0,   // 'initialize' (e.g. dim not yet started)
    708706        kHybernate  =  1,   // do nothing for long time ('hybernate') [wakeup within ~1sec]
     
    910908    void ResetThread()
    911909    {
     910        /*
     911         if (g_reset > 0)
     912
     913            * suspend reading
     914            * reset = g_reset;
     915            * g_reset=0
     916
     917            * reset% 10
     918                == 0  leave event Buffers as they are
     919                == 1  let all buffers drain (write (incomplete) events)
     920                >  1  flush all buffers (do not write buffered events)
     921
     922            * (reset/10)%10
     923                > 0   close all sockets and destroy them (also free the
     924                      allocated read-buffers)
     925                      recreate before resuming operation
     926                      [ this is more than just close/open that can be
     927                        triggered by e.g. close/open the base-socket ]
     928
     929            * (reset/100)%10
     930                > 0   close all open run-files
     931
     932            * (reset/1000)
     933                      sleep so many seconds before resuming operation
     934                      (does not (yet) take into account time left when waiting
     935                      for buffers getting empty ...)
     936
     937            * resume_reading
     938
     939         */
    912940        fMsg.Message("Signal reset to EventBuilder thread...");
    913         g_runStat = kReset;
     941        g_reset = 102;
    914942    }
    915943
Note: See TracChangeset for help on using the changeset viewer.