• Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread Joining and ExecutorService  RSS feed

 
Harsha Smith
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to call join method on a thread that was started by ExecutorService object?
 
Stephan van Hulst
Saloon Keeper
Posts: 6984
110
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't. Instead, when you submit a task to the ExecutorService, you can use the Future of that task to wait until the task is finished, through the get() method.
 
John Vorwald
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may be able to assign a runnable to wait on, and then submitted the object to an ExecutorService.
See question on join.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!