• Post Reply Bookmark Topic Watch Topic
  • New Topic

doubt regarding the ExecutorService future object  RSS feed

 
Aniket Harode
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have these code



the op of the following prog. is like that
start
end
futurefalse
futurefalse
shutdown
get the result
get the result0
get the result1
get the result2


But  i don't understand  why the future.isDone is printing the false as the future object is generating
 
Henry Wong
author
Sheriff
Posts: 23192
124
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aniket Harode wrote:
But  i don't understand  why the future.isDone is printing the false as the future object is generating


The isDone() method is returning false, because the task that the future object is representing has not completed yet. Not exactly sure of your confusion though.

Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!