Thu Jun 6 07:26:55 PDT 1996
Class PipedSieve
Class PipedSieve
java.lang.Object
|
+----java.lang.Thread
|
+----PipedSieve
- public class PipedSieve
- extends Thread
Hoare's Version of Eratosthenes's sieve Using Pipes to connect Threads.
- See Also:
- PrimeFilter
Includes a randomized sleep to make the behavior more intriguing:, Random
Constructor Index
-
PipedSieve()
-
Method Index
-
main(String[])
- Starts a new PipedSieve Thread within a main program
-
run()
- This Piped Sieve prints out primes from 2 to N plus a Zero as a sentinel
Output::= 2 3 4 ...
Constructors
PipedSieve
public PipedSieve()
Methods
main
public static void main(String argv[])
- Starts a new PipedSieve Thread within a main program
run
public void run()
- This Piped Sieve prints out primes from 2 to N plus a Zero as a sentinel
Output::= 2 3 4 ... N Zero.
- Overrides:
- run in class Thread