On Wed, 23 Nov 2022 16:02:37 GMT, Chris Hegarty <che...@openjdk.org> wrote:

>> I would prefer to to avoid creating new factories when the desired function 
>> can be done on the resulting thread.
>> Such as `setDaemon()` and `setName()`, etc.
>> It does avoid the doPriv in this case, but is not necessary and when the 
>> security manager goes away, will leave around clutter (duplicated) 
>> functionality.
>
> Looking beyond this specific change, there is a lot of potential use for this 
> new factory elsewhere in the code. It also avoids similar bugs from possibly 
> reoccurring (by having the setDaemon call inside the factory).

In the interest of making progress, let’s revert the change to the factory. 
This can be done separately, if at all.

-------------

PR: https://git.openjdk.org/jdk/pull/11309

Reply via email to