risor icon indicating copy to clipboard operation
risor copied to clipboard

Stop execution of `VirtualMachine.Call` when context cancelled.

Open gurleensethi opened this issue 1 year ago • 0 comments

Add the ability to stop execution of VirtualMachine.Call when context is cancelled. Currently cancelling the context does nothing.

// This context comes from a different place where it gets cancelled after X seconds
_, err = virtualMachine.Call(ctx, o.runFn, []object.Object{})
if err != nil {
    // Can figure out here if execution was stopped due to cancelled context
}

gurleensethi avatar May 13 '24 04:05 gurleensethi