Define "enabled" in ScheduledExecutorService

Viktor Klang viktor.klang at oracle.com
Mon May 5 08:35:48 UTC 2025


Sounds good, thanks Pavel!

Cheers,
√


Viktor Klang
Software Architect, Java Platform Group
Oracle
________________________________
From: concurrency-discuss <concurrency-discuss-retn at openjdk.org> on behalf of Pavel Rappo <pavel.rappo at gmail.com>
Sent: Friday, 2 May 2025 19:46
To: Alan Bateman <alan.bateman at oracle.com>
Cc: concurrency-discuss at openjdk.org <concurrency-discuss at openjdk.org>
Subject: Re: Define "enabled" in ScheduledExecutorService

Thanks, Alan. That sounds like a plan. Shall I create a corresponding JBS issue?

On Fri 2 May 2025 at 18:04, Alan Bateman <alan.bateman at oracle.com<mailto:alan.bateman at oracle.com>> wrote:
On 02/05/2025 16:17, Pavel Rappo wrote:I've recently re-read documentation for ScheduledExecutorService. I

I've recently re-read documentation for ScheduledExecutorService. I
noticed that the documentation uses the term "enabled", but does not
define it. The semantics of the term feels almost intuitive, but not
quite.

To check my intuitions, I searched through the package documentation
and source comments. I found usages of "enabled" in similar context of
the time-scheduled task execution. Some of those usages are
descriptions that are close to a proper definition. However, those
descriptions are scattered through implementations of
SchedulledExecutorService.

I wonder if it makes sense to properly define "enable"/"enabled" in
SchedulledExecutorService.



As it happens, this came up recently when updating ForkJoinPool to implement ScheduledExecutorService . FJP class description make it clear what "enabled" means. It could potentially copied into SES.


-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/concurrency-discuss/attachments/20250505/18483bef/attachment.htm>


More information about the concurrency-discuss mailing list