public final class PrimeCalculationLauncher
extends java.lang.Object
An example of usage of TuCSoN asynchSupport API. A master agent (MasterAgent)
delegates to nOfWorkers other worker agents (PrimeCalculator) computationally
expensive operations (prime numbers calculations). The master uses TuCSoN
AsynchOpsHelper to request in, inp and out operations in asynchronous mode:
in this way he can do whatever he wants while calculations progress, without
having to synchronously wait the end of all operations. The master makes
MasterAgent.REQUESTS out of tuples like "calcprime(N)". The worker agents
requests inp and calculate primes up to N.
- Author:
- Consalici-Drudi