cultmesh-rs: connect_with_wake, a wake handle on the subscription client #200
Loading…
Reference in a new issue
No description provided.
Delete branch "hands/cultlib-subscription-wake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cut
cultlib-gaps:cut_spec:cut-cultmesh-subscription-wake.r1(rulingthing2:ruling:mesh-wake-poll).CultMeshRudpSubscriptionClient::connect_with_wake(options, wake)installs a closure the pump calls on its own thread after each event is queued (once per Snapshot, Commit, Faulted, Disconnected) and once more when the pump ends aftercloseorDrop. A consumer blocks on whatever the wake feeds instead of pollingtry_drain.connectis unchanged and means no wake; the options struct is untouched. A panic in the wake is caught and the event stays queued. The contract is in the module docs.Tests: eleven additions in
tests/rudp_subscription.rs(existing tests unedited; one helper split intoreconnecting_with).cargo test --lockedcultmesh-rs 170 passed, cultnet-rs 614 passed; the subscription test file ran 20 times green. cargo-mutants over the diff: 3 caught, 1 timeout (Pump::pushwith()), 3 unviable, 0 missed.🤖 Generated with Claude Code