Skip to content

Commit c3eda27

Browse files
authored
Merge pull request ceph#57630 from cbodley/wip-boost-asio-spawn-unlock
rgw/pubsub: Waiter unlocks before suspend Reviewed-by: Yuval Lifshitz <[email protected]>
2 parents 3649964 + 629ad45 commit c3eda27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rgw/driver/rados/rgw_pubsub_push.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ class Waiter {
154154
auto yield = y.get_yield_context();
155155
auto&& token = yield[ec];
156156
boost::asio::async_initiate<boost::asio::yield_context, Signature>(
157-
[this] (auto handler, auto ex) {
157+
[this, &l] (auto handler, auto ex) {
158158
completion = Completion::create(ex, std::move(handler));
159+
l.unlock(); // unlock before suspend
159160
}, token, yield.get_executor());
160-
l.unlock();
161161
return -ec.value();
162162
}
163163
cond.wait(l, [this]{return (done==true);});

0 commit comments

Comments
 (0)