Commit a9ed11c
committed
[Concurrency] Fix race condition in
As of the custom main/global executor changes, there is a race in
`_runAsyncMain()` to construct the main executor; if this goes the wrong way,
the IRGen async tests, which use this function, can fail.
Fix by explicitly constructing a task and enqueing it on the main executor,
instead of detaching a task and trying to hop to it.
rdar://148506256_runAsyncMain.1 parent aedb869 commit a9ed11c
1 file changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1500 | 1500 | | |
1501 | 1501 | | |
1502 | 1502 | | |
1503 | | - | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1504 | 1510 | | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | 1511 | | |
1513 | 1512 | | |
1514 | 1513 | | |
1515 | 1514 | | |
1516 | 1515 | | |
1517 | 1516 | | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1518 | 1525 | | |
1519 | 1526 | | |
1520 | 1527 | | |
| |||
0 commit comments