MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / try_recv_response

Method try_recv_response

nodedb-bridge/src/async_bridge.rs:155–164  ·  view source on GitHub ↗

Try to receive a response from the Data Plane. On success, signals the producer wake eventfd so the TPC core knows there's space for more responses.

(&mut self)

Source from the content-addressed store, hash-verified

153 /// On success, signals the producer wake eventfd so the TPC core knows
154 /// there's space for more responses.
155 pub fn try_recv_response(&mut self) -> Result<Rsp> {
156 let result = self.consumer.try_pop();
157
158 if result.is_ok() {
159 // Signal the Data Plane that response queue has space.
160 let _ = self.rsp_wake.producer_wake.notify();
161 }
162
163 result
164 }
165
166 /// Drain up to `max` responses into the buffer.
167 pub fn drain_responses(&mut self, buf: &mut Vec<Rsp>, max: usize) -> usize {

Callers 1

bridge_channel_roundtripFunction · 0.45

Calls 3

try_popMethod · 0.80
is_okMethod · 0.80
notifyMethod · 0.45

Tested by 1

bridge_channel_roundtripFunction · 0.36