Skip to content

feat: 新增异步 trigger(),使用 pending 计数器 - #3

Merged
abin-z merged 1 commit into
devfrom
feature/manual-trigger
Sep 15, 2026
Merged

abin-z merged 1 commit into
devfrom
feature/manual-trigger

Conversation

@abin-z

@abin-z abin-z commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Body:

Summary

  • add asynchronous trigger() support
  • keep callable owned by the timer worker without std::function
  • preserve all manual trigger requests with a pending counter
  • support move-only callables under C++11
  • serialize scheduled and manual executions

Behavior

  • ignored while paused or stopped
  • does not reset the scheduled deadline
  • stop/restart clears pending requests
  • one-shot timers stop after the first manual or scheduled execution
  • callback exceptions stop the timer

Tests

  • added 10 trigger-related test cases with 28 assertions
  • MSVC Release build and full CTest pass
  • explicit C++11 build and full CTest pass
  • trigger test suite passed 10 consecutive runs

@abin-z
abin-z merged commit 9744f93 into dev Sep 15, 2026
23 of 24 checks passed
@abin-z
abin-z deleted the feature/manual-trigger branch September 15, 2026 16:58
@abin-z abin-z mentioned this pull request Sep 17, 2026
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