Commit 1e17cef
committed
Auto merge of rust-lang#109432 - flba-eb:108594_forkspawn_exponential_backoff, r=workingjubilee
QNX Neutrino: exponential backoff when fork/spawn needs a retry
Fixes rust-lang#108594: When retrying, sleep with an exponential duration. When sleep duration is lower than minimum possible sleeping time, yield instead (this will not be often due to the exponential increase of duration).
Minimum possible sleeping time is determined using `libc::clock_getres` but only when spawn/fork failed the first time in a request. This is cached using a LazyLock.
CC `@gh-tr`
r? `@workingjubilee`
`@rustbot` label +O-neutrinoFile tree
2 files changed
+63
-21
lines changed- library/std/src/sys/unix/process
- src/doc/rustc/src/platform-support
2 files changed
+63
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
40 | 58 | | |
41 | 59 | | |
42 | 60 | | |
| |||
163 | 181 | | |
164 | 182 | | |
165 | 183 | | |
166 | | - | |
| 184 | + | |
| 185 | + | |
167 | 186 | | |
168 | 187 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
172 | 203 | | |
173 | 204 | | |
174 | 205 | | |
| |||
480 | 511 | | |
481 | 512 | | |
482 | 513 | | |
483 | | - | |
484 | | - | |
| 514 | + | |
| 515 | + | |
485 | 516 | | |
486 | 517 | | |
487 | | - | |
488 | | - | |
489 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
490 | 532 | | |
491 | 533 | | |
492 | 534 | | |
493 | | - | |
| 535 | + | |
494 | 536 | | |
495 | 537 | | |
496 | 538 | | |
| |||
620 | 662 | | |
621 | 663 | | |
622 | 664 | | |
623 | | - | |
| 665 | + | |
| 666 | + | |
624 | 667 | | |
625 | 668 | | |
626 | 669 | | |
627 | 670 | | |
628 | 671 | | |
629 | 672 | | |
630 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
631 | 679 | | |
632 | 680 | | |
633 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | 173 | | |
180 | 174 | | |
181 | 175 | | |
| |||
0 commit comments