[External] : Re: Virtual threads and executor ?

Ron Pressler ron.pressler at oracle.com
Fri Nov 19 18:34:21 UTC 2021


> On 19 Nov 2021, at 18:26, forax at univ-mlv.fr wrote:
> 
> ----- Original Message -----
>> From: "Ron Pressler" <ron.pressler at oracle.com>
>> To: "Remi Forax" <forax at univ-mlv.fr>
>> Cc: "loom-dev" <loom-dev at openjdk.java.net>
>> Sent: Jeudi 18 Novembre 2021 21:53:31
>> Subject: Re: Virtual threads and executor ?
> 
>> The rationale is simple: that mechanism is much less mature than others because
>> we’ve focused on higher-priority items that are relevant to more people, and
>> so, while we’re working on it, we don’t want to hold up the rest of the
>> features in the project, so we took it out until we feel comfortable enough
>> with its design and operation.
> 
> I'm not sure to understand what design really encompass here given that a virtual already take an executor.
> 
> For me, this decision will hamper the adoption of Loom, because it's now harder to use virtual thread where previously platform thread were used,
> you can not simply swap the executors to use a virtual thread executor.

Oh, I don’t think we’re talking about the same thing. To migrate to virtual threads, start by replacing existing ExecutorServices with Executors.newVirtualThreadPerTaskExecutor/newThreadPerTaskExecutor. All that’s there.

I thought you were talking about the super-advanced feature of custom schedulers, which are still not mature enough, and don’t aid in migration.

— Ron


More information about the loom-dev mailing list