Skip to content

Commit 83e0706

Browse files
committed
bug engine: fix engine stop race
commit_hash:658bb8acfbc7cf1f3de9bba98b3851dbf4b96a91
1 parent 0a66e63 commit 83e0706

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/engine/plugin_manager.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ class PluginManager final {
1919
: mutex_set_(tp, worker_count)
2020
{}
2121

22+
~PluginManager()
23+
{
24+
// Wait until all Hook*() are finished
25+
(void)mutex_set_.WriteLock();
26+
}
27+
2228
void RegisterPlugin(PluginBase& plugin) {
2329
has_any_plugin_ = true;
2430

0 commit comments

Comments
 (0)