Parallel Programming WS 2014/2015 - File OneLaneTest.java
public class OneLaneTest { public static void main(String[] args) { OneLane lane = new OneLane(); for (int i = 0; i < 100; i++) { if (Math.random() < 0.5) { new SouthBound(lane).start(); } else { new NorthBound(lane).start(); } try { Thread.sleep((int) (Math.random() * 1500)); } catch (InterruptedException e) {} } } }
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 03.12.2014