commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject Re: [lang] new concurrency annotations
Date Tue, 18 Apr 2017 21:06:06 GMT
On Tue, Apr 18, 2017 at 8:38 AM, Emmanuel Bourg <> wrote:

> Le 18/04/2017 à 08:36, Gary Gregory a écrit :
> > Thoughts?
> I think I tend to prefer the JCIP style. ThreadingBehavior conflates the
> notions of thread safety and immutability and intuitively I'd keep them
> separate, even if they are often closely related.

IMO this is OK because immutability implies thread safety, while thread
safety does not imply immutability.

> An object could be
> immutable and not thread safe because it operates on an external
> resource that doesn't work concurrently.

This use case does not make sense to me. If an object is immutable, then it
is thread safe. If you want to include an asynchronous external resource as
part of your object, then the object might not be in fact, immutable.
Speaking of a specific use case would be better.


> Emmanuel Bourg
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

E-Mail: |
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition

Spring Batch in Action

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