Commit 2400ae9
committed
[Test][Concurrency] Fix reflect_task test to avoid a race condition.
This isn't a nice fix, because I can't see a good way to fix this problem
robustly. The issue is that the Concurrency runtime may mutate the AsyncTask
structure from a thread other than the one that is reflecting the current
task, so looking through at the child tasks is inherently dangerous and
may cause the test to crash at random, even though it will *often* work.
To make this a lot less likely, add a .25s delay before reflecting the
parent task.
rdar://1504785971 parent d7bdbcb commit 2400ae9
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
66 | 87 | | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
70 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
71 | 95 | | |
72 | 96 | | |
73 | 97 | | |
| |||
81 | 105 | | |
82 | 106 | | |
83 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
84 | 111 | | |
85 | 112 | | |
86 | 113 | | |
| |||
0 commit comments