swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronization problem


From: Marcus G. Daniels
Subject: Re: Synchronization problem
Date: 17 Mar 2001 13:49:15 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "RL" == Rob Leclerc <Rob> writes:

RL> Given AgentA(34,53) and he is attempting to move to (35,53); that,
RL> what I want to happen is that if (35,53) is occupied, then I want
RL> the agent to move on top of this agent, execute a method that will
RL> affect them both, and by doing so, suspend AgentB(35,53) from
RL> "concurently" attempting the same operation, given the symetry of
RL> their conditions. 

Why don't you send the message to the previous agents in the cell?
Having all agents say "you guys listen to me now" is not a reliable
approach if you don't know what agent will arrive last.

RL> And as I said, I even tried to keeo the method static and
RL> synchronized between the agents, but they would still act as if they
RL> were executing them concurrently.

You mean "static" and "synchronized" in the Java sense?  Hmm, my
impression is that you need to think harder about the schedule
activateIn patterns and not try to keep order among agents of a class
using a class-wide data structure.  Also, Java-synchronized methods
won't have any special meaning in Swarm since every Action now is issued
in sequence, and never in parallel.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]