public void fork ( K to , M msg ) { if ( maxParallelism == 0 ) { throw new IllegalArgumentException ( "maxParallelism == 0, fork() not allowed! Use switchTo." ) ; } try { stopSemaphore . acquire ( ) ; parallelSet . add ( getCurrentKey ( ) ) ; doFork ( to , msg ) ; } catch ( InterruptedException ex ) { throw new IllegalArgumentException ( ex ) ; } }
Fork executing thread .