File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
olp-cpp-sdk-core/include/olp/core/client Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2222#include < atomic>
2323#include < mutex>
2424
25+ #include < olp/core/client/ApiError.h>
26+ #include < olp/core/client/ApiResponse.h>
27+ #include < olp/core/client/CancellationContext.h>
28+ #include < olp/core/client/CancellationToken.h>
2529#include < olp/core/client/Condition.h>
26- #include " olp/core/client/ApiError.h"
27- #include " olp/core/client/ApiResponse.h"
28- #include " olp/core/client/CancellationContext.h"
29- #include " olp/core/client/CancellationToken.h"
3030
3131namespace olp {
3232namespace client {
@@ -161,6 +161,11 @@ class TaskContext {
161161 callback (std::move (user_response));
162162 }
163163
164+ // Resources needs to be released before notification, else lambas would
165+ // have captured resources like network or TaskScheduler
166+ function = nullptr ;
167+ callback = nullptr ;
168+
164169 condition_.Notify ();
165170
166171 state_.store (State::COMPLETED);
You can’t perform that action at this time.
0 commit comments