On Oct 31, 2007 6:41 AM, sebb <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]