Because the class for loop-workers of a particular parallel loop must always be obtained by sub-classing this class to provide an appropriate run() method, instantiation of LoopWorker itself is prevented by making the class abstract.
Class LoopWorker also provides a class method parloop() that can be used to start the parallel execution of a loop. This method expects the lower and upper bound of a parallel stride-1 loop in two integer parameters l and h, some loop-workers in an array w (in fact, these loop-workers will always be workers of a specific LoopWorker_x class), the number of synchronization variables required in parameter numS, and, finally, the representation of a scheduling policy in parameter sched. First, new instantiations of a pool and the appropriate number of synchronization variables are obtained. Thereafter, these objects are made available to all loop-workers and a fork is performed. Finally, the method performs a join by waiting for all threads to finish: