1 Reply Latest reply on Dec 11, 2012 10:59 AM by Vladimir Blagojevic

    DistributedExecutorService future.get(timeout) does not timeout

    Srinivas Narayanan Newbie

      I was trying to check out if I can cancel a distributed task using future's cancel method based on timeout. But I found that the task never timed out. Here is the reference code:

      dist-cancel.jpg

      The TimeWastingCallable sleeps for more 1 second (actually more than 10 sec) but the timeout exception does not occur at all. Hence the cancel never gets executed. Can you please let me know if there is any reason for this to happen. Am I missing something?

      - Srini