Add WorkerExtension trait (on_tick, handle_request, gc_dead) as a per-worker counterpart to the shared RuntimeExtension. This enables per-worker state like timer wheels to live outside core. - TimerWheel, TimerRequest, CloneMsg → crates/std/src/timer_wheel.rs - CtxTimers extension trait replaces Ctx::send_after_ticks/send_interval_ticks - schedule_timer → generic post_worker_request on ContextInner - Worker.timers → Worker.worker_ext (Option<Box<dyn WorkerExtension>>) - StdExtension factory creates TimerWheel per worker Core: 2440→2320 (−120). worker.rs: 696→599 (−97). Cumulative: 2636→2320 (−316, −12.0%). worker.rs: 845→599 (−29.1%). Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
16 lines
505 B
Rust
16 lines
505 B
Rust
mod supervisor;
|
|
mod router;
|
|
pub mod name_registry;
|
|
pub mod monitor_registry;
|
|
pub mod watch_registry;
|
|
pub mod group_registry;
|
|
pub(crate) mod timer_wheel;
|
|
mod extension;
|
|
mod ctx_ext;
|
|
mod runtime_ext;
|
|
|
|
pub use supervisor::{ChildSpec, RestartPolicy, Supervisor, SupervisorStrategy};
|
|
pub use router::{Router, RoutingStrategy};
|
|
pub use extension::StdExtension;
|
|
pub use ctx_ext::{CtxMonitoring, CtxNaming, CtxGroups, CtxWatching, CtxTimers};
|
|
pub use runtime_ext::{RuntimeNaming, RuntimeGroups, RuntimeWatching};
|