Skip to main content

recv

Function recv 

Source
pub fn recv(ctx: &ServiceContext) -> Message
Expand description

Block until a message arrives on this service’s endpoint.

This takes whatever is next. If this service also awaits REPLIES on the same endpoint - which it does, because a task owns exactly one - a plain receive can swallow an unrelated client’s request and drop it. That is not hypothetical; it cost this project a day (CLAUDE.md 8.2). When you are waiting for an answer to something you asked, use crate::call, which matches the reply to its own reply capability and leaves everything else queued.