def start_protocol(): # On ActorSystem config protocol_system_start(SleepingBarber) # Start the protocol prot = ProtocolMailbox.create(SleepingBarber, [S]) # Initiate the first action prot[S].call.start()
def start_protocol(): # On ActorSystem config protocol_system_start(DiningPhilosophers) # Start the protocol ProtocolMailbox.create(DiningPhilosophers, [])
def start_protocol(): # On ActorSystem config protocol_system_start(CigaretteSmoker) # Start the protocol prot = ProtocolMailbox.create(CigaretteSmoker, [A]) prot[A].call.start()