RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization
Roger Riggs
Roger.Riggs at Oracle.com
Tue Oct 13 20:56:53 UTC 2015
Hi Chris,
Thanks for the comments...
On 10/13/2015 3:06 PM, Chris Hegarty wrote:
> On 1 Oct 2015, at 15:12, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>
>> ….
>>
>> Javadoc:
>> http://cr.openjdk.java.net/~rriggs/cleaner-doc/
>>
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-cleaner-8138696/
> This is nice addition. Some comments / questions:
>
> 1) Should the behaviour, TCCL, permissions, etc, for
> the default thread factory be specified in an apiNote?
Yes, it would be nice not to have to repeat them but the InnocuousThread
class does not have
any public API to refer to.
The TCCL is set to the systemClassLoader and the Acc is set to an empty
ProtectionDomain.
>
> 2) threadFactory.newThread() is only ever called once?
> Is this worth a note? Or potentially limiting to some
> other implementation.
Possibly useful to note, but not part of the specification of the behavior.
>
> 3) So the thunk runs with the intersection of the
> permissions that are associated with the thunk and the
> thread’s protection domain, regardless of the caller, right?
yes
For the default thread factory, the intersection is empty since the
Threads ACC is an empty protection domain.
Thanks, Roger
>
> -Chris
More information about the core-libs-dev
mailing list