commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: [math] Mutable "Vector3D"
Date Fri, 24 Apr 2009 18:38:59 GMT
That is a good and subtle point.

On Fri, Apr 24, 2009 at 11:34 AM, sebb <sebbaz@gmail.com> wrote:

> OK, that makes sense.
>
> However, only objects that are immutable from construction are
> thread-safe without needing some kind of synchronisation.
>
> Passing it to a newly created thread would be OK (Thread.start() is
> synch.), but if it is passed to an existing thread some other means of
> synch. would be needed.
>
> On 24/04/2009, Ted Dunning <ted.dunning@gmail.com> wrote:
> > My view is that once it is immutable it is immutable.  Restoring
> mutability
> >  is done by making a new copy and in the context of the applications I
> was
> >  describing is essentially never done.
> >
> >
> >  On Fri, Apr 24, 2009 at 10:39 AM, sebb <sebbaz@gmail.com> wrote:
> >
> >  > allow a programmer to make a mutable copy that
> >  > >  is manipulated for a while destructively and then marked as
> immutable
> >  > when
> >  > >  it is exposed to the outside world.
> >  >
> >  > How does that work?
> >  > Do threads have to get a shared read-lock or exclusive write-lock on
> the
> >  > object?
> >
> >
> >
> >
> >
> > --
> >  Ted Dunning, CTO
> >  DeepDyve
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Ted Dunning, CTO
DeepDyve

111 West Evelyn Ave. Ste. 202
Sunnyvale, CA 94086
www.deepdyve.com
858-414-0013 (m)
408-773-0220 (fax)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message