Re: [lang] new concurrency annotations

2017-04-20 Thread Gary Gregory
On Thu, Apr 20, 2017 at 2:53 PM, Gary Gregory wrote: > > On Wed, Apr 19, 2017 at 1:00 PM, Gary Gregory > wrote: > >> Related to this, is HttpCore which switch from JCIP style annotations >> (4.x) to @Contract (5.x). I'll ask that ML for the reason/experience. >> > > Acoording to Oleg: > -- > The

Re: [lang] new concurrency annotations

2017-04-19 Thread Gary Gregory
Related to this, is HttpCore which switch from JCIP style annotations (4.x) to @Contract (5.x). I'll ask that ML for the reason/experience. Gary On Wed, Apr 19, 2017 at 12:14 PM, Oliver Heger wrote: > > > Am 19.04.2017 um 14:06 schrieb Gilles: > > On Wed, 19 Apr 2017 09:17:32 +0200, Emmanuel Bo

Re: [lang] new concurrency annotations

2017-04-19 Thread Oliver Heger
Am 19.04.2017 um 14:06 schrieb Gilles: > On Wed, 19 Apr 2017 09:17:32 +0200, Emmanuel Bourg wrote: >> Le 19/04/2017 à 00:23, Gary Gregory a écrit : >> >>> I'd like to see a real example before we talk about abstract >>> arguments and >>> counter-arguments, which will never end ;-) >> >> Ok, > >

Re: [lang] new concurrency annotations

2017-04-19 Thread Gilles
On Wed, 19 Apr 2017 09:17:32 +0200, Emmanuel Bourg wrote: Le 19/04/2017 à 00:23, Gary Gregory a écrit : I'd like to see a real example before we talk about abstract arguments and counter-arguments, which will never end ;-) Ok, Good. [If only...] ;-) here is a slightly more substantial ex

Re: [lang] new concurrency annotations

2017-04-19 Thread Emmanuel Bourg
Le 19/04/2017 à 00:23, Gary Gregory a écrit : > I'd like to see a real example before we talk about abstract arguments and > counter-arguments, which will never end ;-) Ok, here is a slightly more substantial example. The following class is immutable but not thread-safe: public class FileAppen

Re: [lang] new concurrency annotations

2017-04-18 Thread Benedikt Ritter
Hi, > Am 19.04.2017 um 00:14 schrieb Gary Gregory : > > I'm OK with dropping them for 3.6 to avoid blocking the release and talking > some more. Either way. Okay, I’ll remove them from the code base before I prepare RC2. Benedikt > > Gary > > On Tue, Apr 18, 2017 at 2:30 PM, Pascal Schumache

Re: [lang] new concurrency annotations

2017-04-18 Thread Gary Gregory
On Tue, Apr 18, 2017 at 2:14 PM, Emmanuel Bourg wrote: > Le 18/04/2017 à 23:06, Gary Gregory a écrit : > > > 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, the

Re: [lang] new concurrency annotations

2017-04-18 Thread Gary Gregory
I'm OK with dropping them for 3.6 to avoid blocking the release and talking some more. Either way. Gary On Tue, Apr 18, 2017 at 2:30 PM, Pascal Schumacher wrote: > I'm fine with either variant. We should not forget that the reason for > adding these annotations was documenting thread-safety of

Re: [lang] new concurrency annotations

2017-04-18 Thread Pascal Schumacher
I'm fine with either variant. We should not forget that the reason for adding these annotations was documenting thread-safety of lang classes. This should not hold up the release, the feature can be postponed to 3.7 if it requires further discussion/thought. Cheers, Pascal Am 18.04.2017 um 0

Re: [lang] new concurrency annotations

2017-04-18 Thread Emmanuel Bourg
Le 18/04/2017 à 23:06, Gary Gregory a écrit : > 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

Re: [lang] new concurrency annotations

2017-04-18 Thread Gary Gregory
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 ar

Re: [lang] new concurrency annotations

2017-04-18 Thread Gary Gregory
On Tue, Apr 18, 2017 at 2:31 AM, sebb wrote: > On 18 April 2017 at 07:36, Gary Gregory wrote: > > Hi All: > > > > We have two styles for the new concurrency annotations in master: > > > > (1) JCIP > > (2) Apache HttpComponents Core > > Where are those located? > (1) JCIP inspired: org.apache.co

Re: [lang] new concurrency annotations

2017-04-18 Thread Emmanuel Bourg
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. An object could be immutable and not thread

Re: [lang] new concurrency annotations

2017-04-18 Thread sebb
On 18 April 2017 at 07:36, Gary Gregory wrote: > Hi All: > > We have two styles for the new concurrency annotations in master: > > (1) JCIP > (2) Apache HttpComponents Core Where are those located? I think it's important to be clear exactly what is being discussed. What about the annotations, Co

Re: [lang] new concurrency annotations

2017-04-18 Thread Jörg Schaible
Benedikt Ritter wrote: > Hi, > >> Am 18.04.2017 um 08:36 schrieb Gary Gregory : >> >> Hi All: >> >> We have two styles for the new concurrency annotations in master: >> >> (1) JCIP >> (2) Apache HttpComponents Core >> >> I would like to delete (1) in favor of (2). I started this discussion >>

Re: [lang] new concurrency annotations

2017-04-18 Thread Gary Gregory
On Mon, Apr 17, 2017 at 11:55 PM, Benedikt Ritter wrote: > Hi, > > > Am 18.04.2017 um 08:36 schrieb Gary Gregory : > > > > Hi All: > > > > We have two styles for the new concurrency annotations in master: > > > > (1) JCIP > > (2) Apache HttpComponents Core > > > > I would like to delete (1) in fa

Re: [lang] new concurrency annotations

2017-04-17 Thread Benedikt Ritter
Hi, > Am 18.04.2017 um 08:36 schrieb Gary Gregory : > > Hi All: > > We have two styles for the new concurrency annotations in master: > > (1) JCIP > (2) Apache HttpComponents Core > > I would like to delete (1) in favor of (2). I started this discussion > inappropriately on a VOTE thread, sorr

[lang] new concurrency annotations

2017-04-17 Thread Gary Gregory
Hi All: We have two styles for the new concurrency annotations in master: (1) JCIP (2) Apache HttpComponents Core I would like to delete (1) in favor of (2). I started this discussion inappropriately on a VOTE thread, sorry for the redo. Then we can proceed with another release candidate. Also