On 01/03/2022 18:17, Sean Mullan wrote:


On 3/1/22 8:01 AM, Andrew Haley wrote:
On 3/1/22 11:45, Andrew Haley wrote:
Sure, you wouldn't
be able to use the default thread pool, but that's no big deal, I would have
thought.

I'm sorry, I'll say that again. :-)


I meant to say "you wouldn't be able to use the default thread pool if
you wanted to use threads with some restrictions (e.g those that couldn't
invoke System.exit()).

Can you explain in a little more detail as to what the compatibility issues are with preventing threads in thread pools from calling System.exit?

AFAIU, I believe the issue is that threads in the default pool are created early, so they don't see the scope local which overrides the semantics of System.exit.

Only threads created _after_ the scope local is set would see the overridden/restricted semantics.

Maurizio


Thanks,
Sean

Reply via email to