-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix constraint arena construction #1151
Fix constraint arena construction #1151
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.
Alternative approach would be deferring initialization of the fields until the task is spawned in the arena or the thread is joined the arena for task execution, essentially adding more laziness to the process. In this case, we can save on superfluous calls to enter and exit observer. It will even save on arena initialization if the task will not be spawned and thread would not be entering arena for execution at all.
Have this approach been considered?
This is an interesting suggestion. I believe it will require extra synchronization on each arena entry (we already have one for |
Signed-off-by: pavelkumbrasev <[email protected]>
Signed-off-by: pavelkumbrasev <[email protected]>
b3d8975
to
120fbed
Compare
Signed-off-by: pavelkumbrasev <[email protected]>
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.
LGTM
Description
Currently constrained arena might be initialized (first touch to fields) on inappropriate constraints because initializing thread doesn't apply constraints during initialization.
This PR reuses
binding_observer
to apply constraints on thread that performs initialization.Fixes # - issue number(s) if exists
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
List users with
@
to send notificationsOther information