FileDocCategorySizeDatePackage
PoliteRunner.javaAPI DocExample405Tue Dec 12 18:57:48 GMT 2000None

PoliteRunner

public class PoliteRunner extends Thread

Fields Summary
private int
tick
private int
num
Constructors Summary
public PoliteRunner(int num)


       
        this.num = num;
    
Methods Summary
public voidrun()

        while (tick < 400000) {
            tick++;
            if ((tick % 50000) == 0) {
                System.out.println("Thread #" + num + ", tick = " + tick);
                yield();
            }
        }