Commit c5afd1a
Use dispatch_semaphore for eager-main-queue module setup gate
Summary:
Replace the `std::mutex` + `std::condition_variable` + `std::shared_ptr<bool>` trio that gates the JS thread on main-queue module construction with a single `dispatch_semaphore_t`. The wait block is invoked exactly once (from `_loadScriptFromSource:`'s `beforeLoad` lambda), so single-shot semaphore semantics fit the contract directly — no condition predicate, no shared state captured by three independent `shared_ptr`s.
Net: 12 lines deleted, 1 captured object instead of 3, no behavior change.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D105953979
fbshipit-source-id: 149e959d04e8466589798ae38c68059db77ecd8b1 parent d672c96 commit c5afd1a
1 file changed
Lines changed: 3 additions & 8 deletions
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
| 382 | + | |
385 | 383 | | |
386 | 384 | | |
387 | | - | |
388 | | - | |
| 385 | + | |
389 | 386 | | |
390 | 387 | | |
391 | 388 | | |
| |||
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 398 | + | |
404 | 399 | | |
405 | 400 | | |
406 | 401 | | |
| |||
0 commit comments