Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4327

Improve TimerManager API to allow removing specific task

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.11.0
    • C++ - Library
    • None
    • Patch Available
    • Patch

    Description

      The TimerManager::remove() method removes all timers with the specified callback, and does so by traversing the list of timers.

      This should be improved by returning a "handle" in `TimerManager::add`, and supporting efficiently removing a single timer from its handle:

      class TimerManager {
           Timer add(shared_ptr<Runnable> task, const struct timeval& value);
           void remove(Timer t);
      }
      

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              Typz Francois Ferrand
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: