Skip to content

Commit

Permalink
Proper thread stop in ls
Browse files Browse the repository at this point in the history
  • Loading branch information
tvorogme committed Apr 11, 2024
1 parent 1644d67 commit c92384f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tvm-python/PyLiteClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ class PyLiteClient {

void stop() {
scheduler_.run_in_context_external([&] { send_closure(engine, &LiteClientActorEngine::exit); });
scheduler_.run_in_context_external([&] { engine.reset(); });
scheduler_.run_in_context_external([] { td::actor::SchedulerContext::get()->stop(); });
scheduler_thread_.join();
scheduler_.stop();
}

private:
Expand Down

0 comments on commit c92384f

Please sign in to comment.