Eine Gabel (im Prinzip)

class Fork {
    private int me;
    String id () { return "Fork-" + me; }
    private boolean taken;
    Fork (int m) { me = m; taken = false; }

    synchronized void drop (Philo p) { .. }
    synchronized void take (Philo p) { .. }
}



Johannes Waldmann 2008-01-23