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

Improve TimerManager API to allow removing specific task

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: C++ - Library
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Flags:
      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

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              Typz Francois Ferrand

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment