Esc

close

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

Releases call storage after sender/receiver fibers return. Idempotent on a cleared handle; received messages and returned statuses remain caller-owned. .

Signature

close :: (call: *Call)
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);
close(*call);
close(*call); // the second call is harmless

See also