Dining philosophers: Difference between revisions
no edit summary
(Added Wren) |
No edit summary |
||
Line 6,303:
def DiningPhilosophers():
forks = [threading.Lock() for n in range(5)]
philosopherNames = ('Aristotle','Kant','
philosophers= [Philosopher(philosopherNames[i], forks[i%5], forks[(i+1)%5]) \
|