View Single Post
  #2   Spotlight this post!  
Unread 09-02-2016, 16:45
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
Re: Java Threading Question

What you have now (creating a new thread each time) is the right thing to do.
Your thread will stop once your run method returns, so you don't need to worry about cleaning up after it. As you've seen, you can't start it again, and you need to make a new thread.