Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Future Tasks  RSS feed

 
Matt Elliott
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What thread handles the execution of a future task?
eg: the thread that scheduled it or does it create a thread?
 
Henry Wong
author
Sheriff
Posts: 22866
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt Elliott wrote:What thread handles the execution of a future task?
eg: the thread that scheduled it or does it create a thread?


A Future object is used to communicate the results of a task back to the caller. So the threads that access it are, the threads in the executor that will set the result, and the caller thread that will retrieve the result.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!