-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Summary
This issue tracks a set of correctness and documentation fixes identified during a security/quality audit.
Problems Found
- Async Emit behavior was effectively blocking and did not consistently respect cancellation timing.
- Zero-value signals could be unsafe to use without explicit initialization.
- Keyed listener removal could remove unkeyed listeners.
- Sync Emit skipped error-returning listeners (TryEmit is the error-propagating path).
- README performance and behavior claims did not match actual behavior.
Fixes Implemented
- Async Emit is now fire-and-forget and checks context cancellation before scheduling listeners.
- Zero-value signals are safe to use.
- Keyed removal only removes keyed listeners.
- Sync Emit invokes error listeners (ignores their errors) while TryEmit still stops on error/cancel.
- README updated to reflect real behavior and benchmark guidance.
Tests
go test ./... -count=1
Related
- PR: from fork
joshuafuller:fix/all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels