Use shared variables to synchronize input and output in an infinite search:
Find such that is prime, until the computation is manually aborted:
Use a shared variable to signal all evaluations to stop as soon as a prime has been found:
Use a shared variable to hand out tasks to do:
Monitor the progress of a calculation, counting major calculation steps:
Return results as they are found:
Watch the results appear in real time: