Thread Locals (was Re: State of Loom)

forax at univ-mlv.fr forax at univ-mlv.fr
Thu May 28 09:15:06 UTC 2020


yes, right !
I've totally forgotten that a Charset is not trusted.

Rémi

----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>, "Mike Rettig" <mike.rettig at gmail.com>
> Cc: "loom-dev" <loom-dev at openjdk.java.net>, "Douglas Surber" <douglas.surber at oracle.com>
> Envoyé: Jeudi 28 Mai 2020 10:20:31
> Objet: Re: Thread Locals (was Re: State of Loom)

> On 27/05/2020 20:38, forax at univ-mlv.fr wrote:
>> yes,
>> it's only safe to use a thread local bound to a carrier thread if you are using
>> it as a cache, like StringCoding does.
>>
> That's actually not safe either. In this case, charset encoders are
> pluggable so encoding may involve running arbitrary code that gets
> preempted when it does a locking or I/O operation.
> 
> -Alan


More information about the loom-dev mailing list