This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Something like vector-grow available?


Jim Blandy <jimb@red-bean.com> writes:
> I'm not sure how I feel about vector-grow.  It seems to me that, in a
> multi-threaded system, if the address of the vector's elements can
> change, then you have to acquire a lock for every access to a vector
> element, if you want to preserve the obvious semantics.  Maybe someone
> else has better ideas on how to implement this.

I don't understand it.  Isn't access to a vector element opaque?  You
have a vector and an index and you access a vector element by
(vector-ref vec index) or so.  But AFAIK you can't get the address of a
vector element (at least not from scheme level).


Jost


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]