Skip to content

Commit b0faf48

Browse files
committed
docs(ios): add comments to ShadowMeasurementUtils.h explaining measureContent behavior
1 parent a32e0e2 commit b0faf48

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ios/internals/ShadowMeasurementUtils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
namespace facebook::react {
1010

11+
// measureContent runs on Yoga's background layout thread and uses
12+
// dispatch_sync to main for UIKit reads. Safe because RN never
13+
// synchronously joins the layout queue from main. A synchronous
14+
// layout flush from main would deadlock.
15+
1116
static inline CGFloat ENRMFontScaleForMeasurement(bool allowFontScaling)
1217
{
1318
if (!allowFontScaling) {

0 commit comments

Comments
 (0)