Pop-Up Thingie

>>> Magnum BBS <<<
  • Home
  • Forum
  • Files
  • Log in

  1. Forum
  2. Usenet
  3. COMP.SOFT-SYS.ACE
  • Thread_Timer_Queue_Test - timer cancellation

    From [email protected]@21:1/5 to All on Mon Feb 13 02:06:04 2017
    Hi,
    reading the code of Thread_Timer_Queue_Test I can not find the deallocation of the Handler object if the timer is canceled.

    I understand:

    - Input_Task::add_timer() allocates a Handler and gives the Handler* pointer to Thread_Timer_Queue by calling its Thread_Timer_Queue::schedule() method

    - in case of timer expiration Handler::handle_timeout() hook is called and the Handler is deleted

    - in case of timer cancellation Thread_Timer_Queue::cancel() will be called.

    I do *not* understand how Handler is deleted if Thread_Timer_Queue::cancel() is called before timer expiration.

    Thank you: Gabor

    PS:
    I am referencing the following sources: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h
    http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • Who's Online

  • System Info

    Sysop: Keyop
    Location: Huddersfield, West Yorkshire, UK
    Users: 715
    Nodes: 16 (2 / 14)
    Uptime: 12:01:20
    Calls: 12,100
    Files: 15,003
    Messages: 6,517,995

© >>> Magnum BBS <<<, 2026