MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / set_host_result

Function set_host_result

compiler/src/main/exports.rs:274–276  ·  view source on GitHub ↗
(handle: u32)

Source from the content-addressed store, hash-verified

272/* Wake a `WaitingHostCall` coro: inject `handle`'s Val into its saved-stack top. 0 ok / 1 stale / 2 no waiter / 3 no paused run. */
273#[unsafe(no_mangle)]
274pub unsafe extern "C" fn set_host_result(handle: u32) -> i32 {
275 with_paused_vm(handle, |vm, val| if vm.inject_host_result(val) { 0 } else { 2 })
276}
277
278/* Wake the `WaitingHostCall(id)` coro with `handle`'s Val; lets the host resolve concurrent calls out of order. Same return codes as `set_host_result`. */
279#[unsafe(no_mangle)]

Callers

nothing calls this directly

Calls 2

with_paused_vmFunction · 0.85
inject_host_resultMethod · 0.80

Tested by

no test coverage detected