swarm-support
[Top][All Lists]
Advanced

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

RE: putValue$atX$Y conundrum


From: Tee Toth-Fejel
Subject: RE: putValue$atX$Y conundrum
Date: Thu, 11 Jan 2001 14:27:19 -0500

> -----Original Message-----
> From: Paul E Johnson [mailto:address@hidden
> Sent: Thursday, January 11, 2001 1:55 PM
> To: address@hidden
> Subject: Re: putValue$atX$Y conundrum
> 
> Tee Toth-Fejel wrote:
> > 
> > What's the story with Diffuse2dImpl.putValue$atX$Y?
...
> > putValue$atX$Y doesn't seem to be doing it's job.

Paul E. Johnson wrote:

> Isn't the space double buffered, so the put does not show up 
> in the get until the lattice is updated?

Ah, yes.  The method updateLattice() takes care of it. 
 
Found the explanation eventually, too, under DblBuffer2d:

"A double buffered space.. DblBuffer2d augments Discrete2d to provide a form
of double buffered space. Two lattices are maintained: lattice (the current
state), and newLattice (the future state). All reads take place from
lattice, all writes take place to newLattice. newLattice is copied to
lattice when updateLattice is called. DblBuffer2d can be used to implement
one model of concurrent action, like in Ca2ds. NOTE: be very careful if
you're using low-level macro access to the world, in particular be sure that
you preserve the write semantics on the newLattice."


Thanks a million!


Tihamer "Tee" Toth-Fejel                    Member of Technical Staff
(734) 623-2544   address@hidden      http://www.erim.org/ 
Center for Electronic Commerce, Environmental Research Institute of Michigan



                  ==================================
   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]