Exemplo n.º 1
0
 def says(self):
   print("")
   while not self.queue.empty():
     (id, msg) = self.queue.get()
     print(ids.type(id) + " (from" + ids.port(id) + ") says: " + msg)
     if self.queue.empty():
       timing.sleep(1)
     print(self.loc + '>')
Exemplo n.º 2
0
 def add_actor(self, id):
   port = str(ids.port(id))
   host = self.hosts[port]
   host.add_actor(id)