File tree 1 file changed +8
-11
lines changed
1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -230,19 +230,16 @@ inline async_simple::coro::Lazy<ret_type> async_io(IO_func io_func,
230
230
auto lock = lock_ref;
231
231
hasCanceled = !slot->emplace (
232
232
async_simple::SignalType::Terminate,
233
- [&obj, weak_lock = std::weak_ptr{lock}, executor = executor ](
233
+ [&obj, weak_lock = std::weak_ptr{lock}](
234
234
async_simple::SignalType signalType,
235
235
async_simple::Signal *signal ) {
236
- asio::dispatch (
237
- executor, [&obj, weak_lock = std::move (weak_lock)]() {
238
- if (auto ptr = weak_lock.lock (); ptr) {
239
- bool expected = false ;
240
- if (!ptr->compare_exchange_strong (
241
- expected, true , std::memory_order_release)) {
242
- detail::cancel (obj);
243
- }
244
- }
245
- });
236
+ if (auto ptr = weak_lock.lock (); ptr) {
237
+ bool expected = false ;
238
+ if (!ptr->compare_exchange_strong (
239
+ expected, true , std::memory_order_release)) {
240
+ detail::cancel (obj);
241
+ }
242
+ }
246
243
});
247
244
if (hasCanceled) {
248
245
asio::dispatch (executor, [handler]() {
You can’t perform that action at this time.
0 commit comments