Universität Paderborn - Home Universität Paderborn
Die Universität der Informationsgesellschaft

Parallel Programming WS 2014/2015 - File Car.java

public class Car extends Thread {
    private FAShuttle x; // the monitor object
  
    public Car(FAShuttle x) {
        this.x = x;
    }

    public void run() {
        while (true) {
            x.offer();
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {}
        }
    }
}

Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 07.12.2014