Class LockStepJob

  • All Implemented Interfaces:

    public abstract class LockStepJob
    extends Object
    implements Runnable
    Helper class to run jobs in lock step in several threads.

    You should override the job() method and make it execute code where blocks are wrapped in:

     if (thread(1)) {
         // code to execute only in thread 1
    The parameter to thread(int) should be 1, 2, 3... depending on the thread you want this block to be executed in.

    After you created the job instances, run the whole process by calling:, job2, job3...);