Skip to content

Workaround #4524 by synchronizing tasks set#4569

Closed
armanbilge wants to merge 2 commits intoseries/3.7.xfrom
issue/4524
Closed

Workaround #4524 by synchronizing tasks set#4569
armanbilge wants to merge 2 commits intoseries/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.

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
Copy link
Copy Markdown
Contributor

durban commented Apr 15, 2026

@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...

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