Commit ae69744
Bug/650 traceback when setting parallelize to false (#656)
* Reproduce deadlock when parallize is false
* Fix potential deadlock when waiting for hooks
If a hook is running while another hook tries to start and there are
not enough slots left then it will wait for the first hook to stop and
release its slots. This first hook will not signal the second if there
are no more hooks left. This results in a deadlock.
This situation is far more likely to occur when parallelize is false
since the hook will consume all the available slots.1 parent 0bc5531 commit ae69744
File tree
3 files changed
+12
-7
lines changed- lib/overcommit
- spec/integration
3 files changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | | - | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
0 commit comments