Forks
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object ForksProvider.type
Members list
Type members
Types
A fork that has been successfully picked up and can be used. It represents exclusive access to a fork.
A fork that has been successfully picked up and can be used. It represents exclusive access to a fork.
Attributes
Interface to a fork. The fork itself may be shared among multiple philosophers, in which case multiple SharedFork interfaces are created for one "physical" fork. These SharedForks then have to coordinate when accessing the underlying "physical" fork. Once SharedFork is successfully picked up from the table (see tryPickUp), the holder of the resulting HeldFork can use it to eat.
Interface to a fork. The fork itself may be shared among multiple philosophers, in which case multiple SharedFork interfaces are created for one "physical" fork. These SharedForks then have to coordinate when accessing the underlying "physical" fork. Once SharedFork is successfully picked up from the table (see tryPickUp), the holder of the resulting HeldFork can use it to eat.
Attributes
Value members
Abstract methods
Gives up access to the fork.
Gives up access to the fork.
Attributes
Releases the fork so that it can be acquired by others.
Releases the fork so that it can be acquired by others.
Attributes
Attempts to pick up a shared fork. If successful, outputs HeldFork on the left. Does not wait for the shared fork to become available. If it is unavailable, outputs SharedFork on the right.
Attempts to pick up a shared fork. If successful, outputs HeldFork on the left. Does not wait for the shared fork to become available. If it is unavailable, outputs SharedFork on the right.