Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaFX equivalent of thread.join?

 
L Purcell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to wait a limited amount of time for a Service/Task to complete before declaring it unsuccessful and cancelling it (essentially a timeout).
I'm new to FX (and Java, really), though I have gotten a Service and Task to work as well as .setOnSucceeded, etc. I can't figure out, though, how to limit the time for the Service/Task to run.
In Java the thread.join() method would seem to do it, but in FX I don't seem to have direct access to the thread(?). Help? Thanks! L
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic