Esc

finish

procedureextensionsince 0.36.1Source
  • macOS: finish works on macOS
  • Linux: finish works on Linux
  • Windows: finish works on Windows
  • Wasm: finish works on Wasm

Waits for final status, discarding unread messages one at a time. Returns an independently owned Status, freed with free_status. Non-OK may follow messages. .

Signature

finish :: (call: *Call) -> Status
Example
channel: Channel; // set transport.base_url and transport.tls before the first call
method := Method.{ path = "/echo.Echo/Say" };
call, status := open_call(*channel, method);
assert(status.code == .OK);
defer close(*call);
status = finish(*call);
defer free_status(*status);
print("%\n", status.code);

See also