Commit dee230c
committed
rgw/notify: process_queue() constructs wait tokens when spawning
process_queue() spawns several coroutines, then waits on a tokens_waiter
until all of them complete
but spawned coroutines don't start immediately. if we call
waiter.async_wait() before any of the coroutine functions get spawned,
it will find `pending_tokens == 0` and return immediately
instead of constructing each token inside the spawned coroutine
function, construct them outside of spawn and capture them in the lambda
to extend their lifetime until the coroutine's completion
Signed-off-by: Casey Bodley <[email protected]>1 parent dbcd888 commit dee230c
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
476 | | - | |
| 475 | + | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
480 | 479 | | |
481 | 480 | | |
482 | 481 | | |
| |||
0 commit comments