Skip to content

fix(executor): align single-thread lifecycle semantics - #101

Merged
LimiNode merged 1 commit into
mainfrom
fix/single-thread-executor-lifecycle
May 19, 2026
Merged

fix(executor): align single-thread lifecycle semantics#101
LimiNode merged 1 commit into
mainfrom
fix/single-thread-executor-lifecycle

Conversation

@LimiNode

Copy link
Copy Markdown
Owner

Summary

  • make native SingleThreadExecutor::wait() drain accepted tasks even after shutdown starts
  • make SingleThreadExecutor::set_queue_policy() a no-op after shutdown on native and single-threaded Emscripten builds
  • document the dedicated executor lifecycle contract
  • add a regression test that wait() does not return early during concurrent shutdown

Test Plan

  • git diff --check -- . ':!external/zlib'
  • g++ -std=c++17 -Iinclude/logit_cpp -Iexternal/time-shield-cpp/include tests/single_thread_executor_test.cpp -o tmp/codex_verify/single_thread_executor_test.exe + run
  • g++ -std=c++17 -Iinclude/logit_cpp -Iexternal/time-shield-cpp/include tests/dedicated_executor_shutdown_test.cpp -o tmp/codex_verify/dedicated_executor_shutdown_test.exe + run
  • g++ -std=c++17 -Iinclude/logit_cpp -Iexternal/time-shield-cpp/include tests/console_logger_dedicated_config_test.cpp -o tmp/codex_verify/console_logger_dedicated_config_test.exe + run
  • g++ -std=c++17 -Iinclude/logit_cpp -Iexternal/time-shield-cpp/include tests/per_logger_mixed_mode_test.cpp -o tmp/codex_verify/per_logger_mixed_mode_test.exe + run

Notes

  • Emscripten branch was updated symmetrically, but local em++ is unavailable, so CI should cover it.

Make SingleThreadExecutor::wait() drain already accepted tasks even after shutdown starts, and make queue policy updates no-op after shutdown in native and Emscripten implementations. Document the dedicated executor lifecycle contract and add a regression test for wait during concurrent shutdown.
@LimiNode
LimiNode merged commit c777b2e into main May 19, 2026
12 checks passed
@LimiNode
LimiNode deleted the fix/single-thread-executor-lifecycle branch May 21, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant