Integrated: 8263903: Use Cleaner instead of finalize to auto stop Timer thread
Kim Barrett
kbarrett at openjdk.java.net
Tue Mar 23 21:19:40 UTC 2021
On Sun, 21 Mar 2021 03:53:24 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to java.util.Timer, replacing the use of deprecated finalization-based cleanup with use of java.lang.ref.Cleaner.
>
> In addition, Timer.cancel now cancels any later execution of the the no longer relevant cleanup.
>
> Testing:
> mach5 tier1
> New AutoStop test verifies the specified cleanup behavior.
> (There are existing tests involving Timer.cancel.)
This pull request has now been integrated.
Changeset: 2425462a
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/2425462a
Stats: 111 lines in 2 files changed: 97 ins; 3 del; 11 mod
8263903: Use Cleaner instead of finalize to auto stop Timer thread
Reviewed-by: dholmes, alanb, bchristi, rriggs, mchung
-------------
PR: https://git.openjdk.java.net/jdk/pull/3106
More information about the core-libs-dev
mailing list