diff --git a/src/runtime.cpp b/src/runtime.cpp index f1c68c1..51a2b62 100644 --- a/src/runtime.cpp +++ b/src/runtime.cpp @@ -40,6 +40,10 @@ struct binding_context_t { while (auto msg = (*ai)->select_message()) { runtime->handle_message(*ai, std::move(msg)); } + { + std::lock_guard g((*ai)->cs); + (*ai)->scheduled = false; + } if (need_delete) { runtime->deconstruct_object(*ai); }