Commit 16dc750
fix freezes on AppExit on macos (#23838)
# Objective
- Fix #23313
- On macOS, sending `AppExit` sometimes freezes the app
## Solution
- This was caused by a race condition between the main thread and the
render thread both holding an `Arc` to the window
- Make sure more things drop on the main thread in the correct order
## Testing
- Ran the repro a few times, it used to freezes before, it doesn't after
---------
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>1 parent 3d04eeb commit 16dc750
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
0 commit comments