You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "John Fang (JIRA)" <ji...@apache.org> on 2016/03/30 10:26:25 UTC
[jira] [Assigned] (STORM-1582) asyncLoop will calls repeatedly when
the return type of call only is Long
[ https://issues.apache.org/jira/browse/STORM-1582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Fang reassigned STORM-1582:
--------------------------------
Assignee: John Fang
> asyncLoop will calls repeatedly when the return type of call only is Long
> -------------------------------------------------------------------------
>
> Key: STORM-1582
> URL: https://issues.apache.org/jira/browse/STORM-1582
> Project: Apache Storm
> Issue Type: Question
> Reporter: John Fang
> Assignee: John Fang
>
> It can repeatedly invoke fn.call when only the return type of call is Long. I think it maybe a bug.
> public static SmartThread asyncLoop(final Callable afn,
> boolean isDaemon, final Thread.UncaughtExceptionHandler eh,
> int priority, final boolean isFactory, boolean startImmediately,
> String threadName) {
> SmartThread thread = new SmartThread(new Runnable() {
> public void run() {
> Object s;
> try {
> Callable fn = isFactory ? (Callable) afn.call() : afn;
> while ((s = fn.call()) instanceof Long) { //////????????
> Time.sleepSecs((Long) s);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)