MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / flush

Method flush

crates/hyperqueue/src/worker/streamer.rs:122–136  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

120
121impl StreamSender {
122 pub async fn flush(&self) -> tako::Result<()> {
123 let (sender, receiver) = oneshot::channel();
124 if self
125 .sender
126 .send(StreamerMessage::Flush(sender))
127 .await
128 .is_err()
129 {
130 return Err("Sending flush message failed".into());
131 }
132 receiver.await.map_err(|_| {
133 tako::Error::GenericError("Stream failed while flushing stream".to_string())
134 })?;
135 Ok(())
136 }
137
138 pub async fn send_data(&self, channel: ChannelId, data: Vec<u8>) -> tako::Result<()> {
139 if self

Callers 7

stream_jsonFunction · 0.45
export_jsonFunction · 0.45
stream_writerFunction · 0.45
write_node_fileFunction · 0.45
create_task_futureFunction · 0.45
task_mainFunction · 0.45

Calls 3

intoMethod · 0.80
to_stringMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected