Skip to content

Workaround #4524 by synchronizing tasks set#4569

Merged
durban merged 2 commits into
series/3.7.xfrom
issue/4524
Jun 7, 2026
Merged

Workaround #4524 by synchronizing tasks set#4569
durban merged 2 commits into
series/3.7.xfrom
issue/4524

Conversation

@armanbilge

Copy link
Copy Markdown
Member

Fixes #4524.

@armanbilge armanbilge added this to the v3.7.next milestone Mar 15, 2026
Comment on lines +283 to 284
@deprecated("Not intended to be public", "3.7.1")
final class ConcurrentState(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To comply with our no-source-breaking-patches versioning scheme, we may want to hold off the deprecation until 3.8.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, I think it's fine. As fas as I can see, anyone trying to use this would've realized, that they can't (not in any useful way).

val currentID: AtomicLong = new AtomicLong(),
val currentNanos: AtomicLong = new AtomicLong(),
val tasks: java.util.SortedSet[Task] =
Collections.synchronizedSortedSet(new ConcurrentSkipListSet(Task.comparator)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just use a ju.TreeSet instead the ConcurrentSkipListSet. As it is now, on the JVM it's "doubly thread safe". (Which is not incorrect, of course, just unnecessary.)

@djspiewak djspiewak closed this Apr 11, 2026
@djspiewak djspiewak deleted the issue/4524 branch April 11, 2026 15:36
@durban

durban commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

@djspiewak Did you really wanted to close this? As far as I can tell, the original issue still exists, and this seems like a reasonable workaround...

@armanbilge armanbilge restored the issue/4524 branch June 1, 2026 17:05
@armanbilge armanbilge reopened this Jun 1, 2026
@durban durban merged commit 504db0c into series/3.7.x Jun 7, 2026
72 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants