Tue Jun 4 11:34:56 PDT 1996 Class ThreadedSieve

Class ThreadedSieve

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----ThreadedSieve

public class ThreadedSieve
extends Thread
Hoare's Version of Eratosthenes's sieve Using Threads. This example however never has more than one Thread active for nearly all of the time. Each thread is running as a semicoroutine and restarts its suspended parent before suspending itself.
See Also:
PrimeThread

Constructor Index

ThreadedSieve()

Method Index

main(String[])
Lets processes run as a main program/application
run()
Prints out primes from 2 to 100


Constructors

ThreadedSieve
  public ThreadedSieve()


Methods

main
  public static void main(String argv[])
Lets processes run as a main program/application
run
  public void run()
Prints out primes from 2 to 100
Overrides:
run in class Thread