lockObject = new Object ( );
final CyclicBarrier
cyclicBarrier = new CyclicBarrier ( 2 );
final PRun
pRun = new PRun (
network.getDiscreteEventQueue ( ),
network,
lockObject,
cyclicBarrier );
final Runnable runnable = new Runnable ( )
{
@Override
public void run ( )
{
try
{
cyclicBarrier.await ( );
Thread.sleep ( 5 * 60 * 1000 );
}
catch ( Exception e )
{
e.printStackTrace();
}
finally
{
network.stop = true;
network.trialDone = true;
}
}
};
new Thread ( runnable ).start ( );
pRun.run ( );
}