No matching definitions.

tur/workflow

stdlib/workflow.tur

persistent workflow helpers built on tur/serial.

Since: Phase 21

defn

save-cont!

(save-cont! [k :ptr<void>] :ptr<void>)

serialise an opaque serial-continuation handle to a bytes value.

kopaque continuation pointer from serial-shift

A bytes :ptr<void> on success, or nil when codegen is not yet implemented.

Since: Phase 21

defn

resume-cont!

(resume-cont! [b :ptr<void> v :int] :int)

deserialise a bytes value and resume the encoded continuation with v.

bserialised bytes from save-cont!
vvalue to pass to the resumed continuation

The continuation's return value; 0 when codegen is not yet implemented.

Since: Phase 21

defn

workflow-suspend

(workflow-suspend [k :ptr<void>] :ptr<void>)

suspend the current workflow step by serialising continuation k.

kopaque continuation pointer from serial-shift

Serialised bytes :ptr<void> from save-cont! (nil if not yet implemented).

(serial-reset
    (let [ok? (serial-shift (fn [k] (workflow-suspend k)) false)]
      ...))

Since: Phase 21

defn

workflow-resume

(workflow-resume [b :ptr<void> v :int] :int)

resume a previously suspended workflow step with value v.

bbytes value produced by workflow-suspend
vvalue to inject into the resumed continuation

The continuation's return value (0 when not yet implemented).

Since: Phase 21