Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread Joining and ExecutorService

 
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
Bartender
Posts: 6323
78
  • 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