Hi All,
This code is from the Java2D line examples
Conversion of most of the sample code has gone well, but the threads
have thrown me into a state of confusion
Any clues on how to code the following in JRuby. Google has not been
much help.
e.g. How to use syncronized in the stop method is one of my problems.
public void start() {
thread = new Thread(this);
thread.setPriority(Thread.MIN_PRIORITY);
thread.start();
}
public synchronized void stop() {
thread = null;
}
public void run() {
Thread me = Thread.currentThread();
while (thread == me) {
repaint();
try {
thread.sleep(10);
} catch (InterruptedException e) { break; }
}
thread = null;
}
Thanks
Paul F.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email