- Up - | Next >> |
In the mail box model, each agent is equipped with his own mail box. In the simplest case, the agent is known to others only through its mailbox. A mailbox can be simply be modelled by a port and an agent by a thread reading the stream of this port.
declare
MailBox % will be bound to a port
proc {MakeAgent Process MailBox}
thread {ForAll {Port.new $ MailBox} Process} end
end
proc{Process X}
{Browse 'new mail arrived'}
end
{MakeAgent Process MailBox}
{Port.send MailBox 1}
{Port.send MailBox 2}
Do you know how should a newgroup model work?
- Up - | Next >> |