View Single Post
  #4   Spotlight this post!  
Unread 01-05-2012, 23:33
vinnie's Avatar
vinnie vinnie is offline
Registered User
FRC #3309 (Friarbots)
Team Role: College Student
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Los Angeles / Anaheim
Posts: 107
vinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond repute
Re: Multitasking in Java

If you wanted to use it for something like driving the robot, it would probably be easiest to use the built-in Command classes, but if you have your heart set on using Thread or want to use it for something like socket communication (like I did with our robot), then you would need to have a while(true) loop inside your run method, otherwise it would only run once. If you would like an example of using the Command based model, I would be happy to post one, just let me know.
Reply With Quote