View Single Post
  #4   Spotlight this post!  
Unread 12-02-2015, 13:30
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Multithreading in Java

1. Creating a thread
http://www.tutorialspoint.com/java/j...ithreading.htm
The first example demonstrates creating a class type that creates a thread to do work in.

2. How to share information between thread and your main program flow
The next step is to take the results of the camera logic and save them to some member variables in the class type, so that the "main" thread in Robot can safely poll them out using sychronized accessors.
http://docs.oracle.com/javase/tutori.../syncmeth.html
Reply With Quote