Future:isDone always returns false even though call method completed correctly

185 views
Skip to first unread message

jeffsc...@gmail.com

unread,
Dec 28, 2013, 3:13:27 PM12/28/13
to haze...@googlegroups.com
I'm attempting to use Hazelcast to perform a set calculations on the node on which the data is located.  I'm submitting a patitionaware callable class to the exectutionservice that I obtained from the hazelcast instance.  This works and the computations seem to take place in the right place.

Problem: When I try to use the Future object with isDone so that I don't block waiting for the result, isDone never returns true. For example this code snippet will be stuck in the while loop for ever, but if I add a res.get() it works.

There must be something simple I'm overlooking any ideas?

Future<Chip> res = exec.submit(new CallableCompression(cID, currentIndex));
 while(!res.isDone()) {
    try {
  Thread.sleep(1000);
       } catch (InterruptedException ex) {
  Logger.getLogger(Image.class.getName()).log(Level.SEVERE, null, ex);
        } 
   }

Thanks,
Jeff

Mehmet Dogan

unread,
Dec 28, 2013, 3:39:27 PM12/28/13
to haze...@googlegroups.com

This is a known bug and it's fixed in master branch already.

See issue https://github.com/hazelcast/hazelcast/issues/850

@mmdogan

~Sent from mobile

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/53c03120-e096-45a6-8d5b-32d8ec2ee963%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

jeffsc...@gmail.com

unread,
Jan 13, 2014, 4:55:37 PM1/13/14
to haze...@googlegroups.com
hmmm.  I'm using version 3.2 It looks like that fix has been merged into the 3.x branch (but maybe I'm not following the git logs correctly).  Do I need to get the master branch and build that?

jeffsc...@gmail.com

unread,
Jan 13, 2014, 4:57:55 PM1/13/14
to haze...@googlegroups.com
Sorry missed typed on my last post, I'm using 3.1.4 the last built version I could find

thanks much


On Saturday, December 28, 2013 3:39:27 PM UTC-5, Mehmet Dogan wrote:

Christoph Engelbert

unread,
Jan 14, 2014, 12:54:00 AM1/14/14
to haze...@googlegroups.com
It seems like there was no backport of the fix but you may easily build it yourself.
Reply all
Reply to author
Forward
0 new messages