thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francois Ferrand (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-4327) Improve TimerManager API to allow removing specific task
Date Mon, 11 Sep 2017 10:10:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-4327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Francois Ferrand updated THRIFT-4327:
-------------------------------------
    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:

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


  was:
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:

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



> Improve TimerManager API to allow removing specific task
> --------------------------------------------------------
>
>                 Key: THRIFT-4327
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4327
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Francois Ferrand
>
> 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:
> {code:java}
> class TimerManager {
>      Timer add(shared_ptr<Runnable> task, const struct timeval& value);
>      void remove(Timer t);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message