Commit aa92cea
refactor: collapse the four AcceptWaiters copies onto kio::Fan (#359)
kio 0.5.4 released `Fan`, so the shared accept list, its waker, and the hold that
keeps an inline wake from landing under the accept lock all come from upstream.
That deletes 1,264 lines of near-identical `waiters.rs` across the four backends.
The `arm`/`disarm` pair becomes a `Hold` guard, which is harder to misuse: there
is no count to forget to bring down. It is still dropped explicitly after the
accept lock, because where it drops is where a held-back wake is delivered.
`Arc<AcceptWaiters>` becomes a plain `Fan` — it is already a shared handle — and
the cached wakers come from `Fan::waker()`.
iroh and noq carried nothing else in that module, so the file goes. quinn and
quiche keep `Parked`, the release-on-`Ready` bridge that kio deliberately does
not do, at 56 lines each.
Behaviour is unchanged and the accept tests say so: every accepter still gets
woken, a departing one still does not strand the others, and an abandoned one
still releases its slot.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent b2a4cfd commit aa92cea
14 files changed
Lines changed: 155 additions & 1223 deletions
File tree
- rs
- web-transport-iroh
- src
- web-transport-noq
- src
- web-transport-quiche
- src
- web-transport-quinn
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
381 | | - | |
| 380 | + | |
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
385 | | - | |
386 | | - | |
387 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
388 | 387 | | |
389 | 388 | | |
390 | | - | |
| 389 | + | |
391 | 390 | | |
392 | 391 | | |
393 | | - | |
394 | | - | |
395 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
| |||
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
405 | | - | |
| 407 | + | |
406 | 408 | | |
407 | 409 | | |
408 | 410 | | |
409 | | - | |
410 | | - | |
411 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
412 | 414 | | |
413 | 415 | | |
414 | | - | |
| 416 | + | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
418 | | - | |
419 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
420 | 425 | | |
421 | 426 | | |
422 | 427 | | |
| |||
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
445 | | - | |
446 | | - | |
| 450 | + | |
| 451 | + | |
447 | 452 | | |
448 | 453 | | |
449 | 454 | | |
| |||
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
| |||
0 commit comments