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

AsyncTask class in Java?

 
L Purcell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The AsyncTask class in Android is a clean and simple way to create and handle simple threads. Is there a similar class in JAVA? I haven't found anything quite like that...
Thanks,
 
Alexei Kaigorodov
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SwingWorker?
 
Winston Gutkowski
Bartender
Pie
Posts: 10527
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
L Purcell wrote:The AsyncTask class in Android is a clean and simple way to create and handle simple threads. Is there a similar class in JAVA? I haven't found anything quite like that...

Runnable?

Winston
 
Tim Moores
Bartender
Posts: 2947
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:Runnable?

AsyncTask does more than that. Not only does it run in a background thread, but it also has facilities to post updates in the UI thread. SwingWorker would indeed be a closer approximation in Java.
 
Rob Spoor
Sheriff
Pie
Posts: 20665
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also check out this thread about SecondaryLoop.
 
L Purcell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, everyone! I'll look into those ideas.
L
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic