#30 A timed Thread Queue

Common_Libraries
closed
David Sugar
Library (32)
5
2007-01-24
2006-12-21
Angelo Naselli
No

It would be nice to have the ThreadQueue
implementation improved by adding a timeout,
for instance a timed wait on a semaphore,
so that users can have an onTimer() call back
in case of timeout.

I've submitted a feature request for that with patches on
(old?) Commonc++ site, please follow bug #1531614.

Discussion

  • Angelo Naselli
    Angelo Naselli
    2006-12-21

    Logged In: YES
    user_id=457819
    Originator: YES

    compared to the version I've uploaded the
    setTimer has been improved by the following
    taht starts thread if it isn't already:
    void TimedThreadQueue::setTimer(timeout_t timeout)
    {
    enterMutex();
    _timeout = timeout;
    leaveMutex();
    if(!started)
    {
    start();
    started = true;
    }
    else if(!first)
    Semaphore::post(); // restart timer
    }

    Angelo

     
  • David Sugar
    David Sugar
    2007-01-24

    Logged In: YES
    user_id=217
    Originator: NO

    I will look at the referenced code for 1.5.4...

     
  • David Sugar
    David Sugar
    2007-01-24

    • assigned_to: nobody --> dyfet
     
  • David Sugar
    David Sugar
    2007-01-24

    • status: open --> closed
     
  • David Sugar
    David Sugar
    2007-01-24

    Logged In: YES
    user_id=217
    Originator: NO

    Accepted for 1.5.4