-
Notifications
You must be signed in to change notification settings - Fork 202
Closed
Description
Accessing the smart pointer after it is moved does not make sense. This way if an exception is thrown in the try block the code will always fail.
asyncplusplus/include/async++/task_base.h
Lines 96 to 106 in 756893f
| // Run a single continuation | |
| template<typename Sched> | |
| void run_continuation(Sched& sched, task_ptr&& cont) | |
| { | |
| LIBASYNC_TRY { | |
| detail::schedule_task(sched, std::move(cont)); | |
| } LIBASYNC_CATCH(...) { | |
| // This is suboptimal, but better than letting the exception leak | |
| cont->vtable->cancel(cont.get(), std::current_exception()); | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels