Repository navigation
Commit 4c6b983
committed
[BUG] Wait in slices, and keep the null handle out of curl_multi_info_read
Two corrections to the change before it, both found reviewing it rather than
reported.
The wait cannot be interrupted. wakeupBackgroundThread reaches the worker
through the multi handle, and the whole point of that branch is that there is
not one, so the destructor cannot cut the wait short and the previous commit
saying teardown was unchanged is wrong. Destroying a client whose worker was
inside the wait measured 168 ms, five runs out of five. Taking the same wait in
16 ms slices and rechecking is_shutdown_ leaves the retry rate where it was and
brings that to 10 ms, five runs out of five.
And curl_multi_info_read was still called with the handle libcurl had refused to
give. curl_multi_poll and curl_multi_wait cannot see one, since they sit inside
the branch that only runs when perform succeeded. curl_multi_add_handle and
curl_multi_remove_handle can, but they are in doAddSessions and doRemoveSessions,
which open-telemetry#4395 and open-telemetry#4405 rewrite, so they are named in the description rather than
changed here.
Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>1 parent d40daf7 commit 4c6b983
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
525 | 535 | | |
526 | 536 | | |
527 | 537 | | |
| |||
556 | 566 | | |
557 | 567 | | |
558 | 568 | | |
559 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
560 | 572 | | |
561 | 573 | | |
562 | 574 | | |
| |||
0 commit comments