File
Doc
Category
Size
Date
Package
Chopstick.java
API Doc
Example
378
Tue Dec 12 18:57:48 GMT 2000
None
Chopstick
java.lang.Object
public class Chopstick extends Object
Fields Summary
Philosopher
owner
Constructors Summary
Methods Summary
public synchronized void
grab
(
Philosopher
phil)
while (owner != null) wait(); owner = phil;
public synchronized void
release
(
Philosopher
phil)
if (phil == owner) owner = null; notify();
Java Code Source