-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceLoader: Let resource setup late steps invoke loading in turn #94910
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me though TIWAGOS, to me especially the (realized this wasn't necessarily relevant either way, as there's nothing wrong with notifying while still locked, or while not locked, just affects some timing)load_task.cond_var->notify_all();
is a strong indicator that it should be unlocked at that point based on how condition variables work
But my TIWAGOS would mainly apply to if there aren't any critical sections at all in that part, that much I can't speak to
6da23af
to
76ac8b3
Compare
Thanks to heaven, you smelled something here. I added the lock-unlock too early! I've fixed it. It now happens once the last write has been done, because we don't want other threads to see the state of the task until we're done writing it. It's only afterwards that we enter that last "read-only" segment of code. |
76ac8b3
to
fdeae00
Compare
Pushed again since the failed loading branch of the |
fdeae00
to
5640e8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cautiously approving as I don't really understand that code, but know RandomShaper does. More eyes welcome on this, would probably merge soon to include this in 4.3 RC2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not familiar with the details in this section but nothing looks obviously weird here, and these parts don't necessarily look like a critical section so should be safe, but TIWAGOS
Thanks! |
The low-level issue in #94586 that the
BinaryMutex
was being tried to be recursively relocked.Fixes #94586.