FileDocCategorySizeDatePackage
FibonacciTest.javaAPI DocExample471Sat Apr 17 23:40:50 BST 2004javathreads.examples.ch08.example6

FibonacciTest

public class FibonacciTest extends Object

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


        ArrayBlockingQueue<Integer> queue;
        queue = new ArrayBlockingQueue<Integer>(10);
        new FibonacciProducer(queue);

        int nThreads = Integer.parseInt(args[0]);
        for (int i = 0; i < nThreads; i++)
            new FibonacciConsumer(queue);