MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / blocking_finish

Method blocking_finish

crates/test-programs/src/tls.rs:9–24  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7
8impl ClientHandshake {
9 pub fn blocking_finish(self) -> Result<(ClientConnection, InputStream, OutputStream), IoError> {
10 let future = ClientHandshake::finish(self);
11 let timeout = monotonic_clock::subscribe_duration(TIMEOUT_NS * 200);
12 let pollable = future.subscribe();
13
14 loop {
15 match future.get() {
16 None => pollable.block_until(&timeout).expect("timed out"),
17 Some(Ok(r)) => return r,
18 Some(Err(e)) => {
19 eprintln!("{e:?}");
20 unimplemented!()
21 }
22 }
23 }
24 }
25}
26
27impl ClientConnection {

Callers 2

Calls 5

finishFunction · 0.85
block_untilMethod · 0.80
subscribeMethod · 0.45
getMethod · 0.45
expectMethod · 0.45

Tested by 2