Skip to content

Event::set_value not needed? #1954

Answered by awni
zcbenz asked this question in Q&A
Mar 11, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

We don't use the value anymore.. that is a recent change though. I preserved the ability to set the value since it could be useful if we want to switch to more fine-grained synchronization (for example synchronizing on individual arrays rather than the entire graph).

You should be able to implement it with the value using atomic wait and notify. The thread that's waiting has to atomically check if the current value is greater or equal to it's required value before it can stop waiting.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@awni
Comment options

awni Mar 11, 2025
Maintainer

@zcbenz
Comment options

Answer selected by zcbenz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants