[
https://issues.apache.org/jira/browse/THRIFT-4327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161016#comment-16161016
]
ASF GitHub Bot commented on THRIFT-4327:
----------------------------------------
GitHub user Typz opened a pull request:
https://github.com/apache/thrift/pull/1353
THRIFT-4327: add API to efficiently remove a single timer
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Typz/thrift THRIFT-4327
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1353.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1353
----
commit d1fd82a84af5346ce8b2c68cd8cb07c6533340a6
Author: Francois Ferrand <[email protected]>
Date: 2017-09-11T10:09:40Z
THRIFT-4327: add API to efficiently remove a single timer
----
> 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)