Repository navigation
feat: add dynamic hook dispatcher - #105
Conversation
|
@1m55555555
Happy to re-review once these are addressed. |
|
@Bury-Lee I will update the PR as follows:
I will run the focused tests, race tests, the short repository test suite, and go vet before requesting another review. |
|
Hi @Bury-Lee, I have addressed all requested changes in db9fec5:\n\n- Removed the readme.md and README_zh-CN.md changes.\n- Replaced runtime/debug.Stack() with agilepool.Stack(2).\n- Added comments for callbackSnapshot, snapshot, appendCallback, and invoke, documenting the immutable snapshot and per-callback recovery semantics.\n\nValidation completed:\n- go test ./hook/dynamic -count=1\n- go test -race ./hook/dynamic -count=1\n- go test -short ./... -count=1\n- go vet ./...\n\nCould you please re-review when convenient? Thanks! |
| poolClosed []agilepool.PoolHook | ||
| } | ||
|
|
||
| var _ agilepool.Hooks = (*Hooks)(nil) |
There was a problem hiding this comment.
This line of code is redundant and unnecessary; please remove it in the next release.
Summary
Semantics
Each lifecycle event reads one immutable callback snapshot when dispatch begins. Callbacks added during a dispatch apply only to later events. Different lifecycle events for the same task may observe different snapshots.
Implementation
Validation
Scope
No changes to pool.go, the default hook package, scheduler, task buffer, or existing Hook contract.