FileDocCategorySizeDatePackage
SingleThreadTest.javaAPI DocExample422Tue Apr 27 23:01:58 BST 2004javathreads.examples.ch10.example2

SingleThreadTest

public class SingleThreadTest extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        int nTasks = Integer.parseInt(args[0]);
	int fib = Integer.parseInt(args[1]);
	SingleThreadAccess sta = new SingleThreadAccess();
	for (int i = 0; i < nTasks; i++)
	    sta.invokeLater(new Task(fib, "Task " + i));
	sta.shutdown();