fix(plugins): prevent callback races

Lifecycle callbacks can be registered while
another thread dispatches them, risking races
and iterator invalidation.

Snapshot shared callback objects under a mutex,
then invoke them unlocked to preserve reentrancy
and mutable callback state.
This commit is contained in:
Andrew
2026-07-13 17:25:39 +08:00
parent 592e5f92f8
commit b4c9747f09
6 changed files with 168 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ add_executable(${_TEST_NAME}_tests
${_TEST_NAME}_tests_main.cpp
test_action_source.cpp
test_plugin_host_api.cpp
test_plugin_callback_list.cpp
test_plugin_capability_identifier.cpp
test_plugin_install.cpp
test_plugin_sort.cpp