Make Yoga thread safe #786
Reference in New Issue
Block a user
No description provided.
Delete Branch "yoga_thread_safety_master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue ref: https://github.com/facebook/yoga/issues/769
Problem
gNodeInstanceCount
,gConfigInstanceCount
,gCurrentGenerationCount
,gDepth
are global variables inYoga.cpp
. They are not safe when using multithreading.My idea
atomic
forgNodeInstanceCount
andgConfigInstanceCount
because of counting instances only.gCurrentGenerationCount
andgDepth
in root node for multithreading.My solution
gNodeInstanceCount
andgConfigInstanceCount
gCurrentGenerationCount
andgDepth
are stored inYGNode
.Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Pull request closed