commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent Worden" <brent.wor...@gmail.com>
Subject Re: Trouble with commons-math
Date Thu, 01 Nov 2007 12:07:34 GMT
On Oct 31, 2007 6:41 AM, sebb <sebbaz@gmail.com> wrote:
>
> However, I'm not sure that the class is thread-safe.
> For example the windowSize field is not final, and therefore may not
> be visible to all threads after construction. Making it final would
> fix this.
>
> Fixing the eDA field might be tricky.
>

I don't think this is a problem because no object reference to the
SynchronizedDescriptiveStatistics instance is published to other
objects during construction.  The first time an object reference is
made available to other objects (and other threads) is after the
constructor returns a new object.  At which time, the object is fully
constructed and all instance variables have been initialized.

Thanks,

Brent.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message