[ https://issues.apache.org/jira/browse/FLINK-4384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418562#comment-15418562 ]
ASF GitHub Bot commented on FLINK-4384: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/2360#discussion_r74561951 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rpc/MainThreadExecutor.java --- @@ -52,4 +52,13 @@ * @return Future of the callable result */ <V> Future<V> callAsync(Callable<V> callable, Timeout callTimeout); + + /** + * Execute the runnable in the main thread of the underlying RPC endpoint, with + * a delay of the given number of milliseconds. + * + * @param runnable Runnable to be executed + * @param delay The delay after which the runnable will be executed + */ + void scheduleRunAsync(Runnable runnable, long delay); --- End diff -- Shall we also add a `scheduleRunAsync` method where we allow to pass a `TimeUnit` argument for convenience? > Add a "scheduleRunAsync()" feature to the RpcEndpoint > ----------------------------------------------------- > > Key: FLINK-4384 > URL: https://issues.apache.org/jira/browse/FLINK-4384 > Project: Flink > Issue Type: Sub-task > Components: Distributed Coordination > Environment: FLIP-6 feature branch > Reporter: Stephan Ewen > Fix For: 1.2.0 > > > It is a common pattern to schedule a call to be executed in the future. > Examples are > - delays in retries > - heartbeats, > - checking for heartbeat timeouts > I suggest to add a {{scheduleRunAsync()}} method to the {{RpcEndpoint}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)