Philosophers

libretto.examples.diningPhilosophers.Philosophers
See thePhilosophers companion object
class Philosophers[ForksImpl <: Forks](val forks: ForksImpl)

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def behavior(name: String)(cycles: Int): SharedFork |*| SharedFork -⚬ Done

A philosopher is given access to two shared forks (each of them shared with one neighbor). When a philosopher finishes, it produces a Done signal.

A philosopher is given access to two shared forks (each of them shared with one neighbor). When a philosopher finishes, it produces a Done signal.

Attributes

cycles

number of times the philosopher will eat

name

name of the philosopher

Concrete fields

val forks: ForksImpl