Private.ActionAction module with private functionality (unstable).
These definitions are subject to change even between minor versions of the library.
type nonrec 'a t = 'a tSee Affect.Action.t.
val never : 'a tSee Affect.Action.never.
val always : 'a -> 'a tSee Affect.Action.always.
See Affect.Action.choose.
See Affect.Action.map.
See Affect.Action.guard.
See Affect.Action.either.
val invoke : 'a t -> 'aSee Affect.Action.invoke.
val invoke_poll : 'a t -> 'a optiontype nonrec unblocker = unblockermodule Result : sig ... endAction results.
module Meta : sig ... endAction and action invocation metadata.
module Invocation : sig ... endAction invocations.
module Blocked : sig ... endBlocked action invocations.
module Primitive : sig ... endPrimitive actions.
module Unblocker : sig ... endAction invocation unblockers.
Note. You should never handle these effects in the scope of a function given to Affect.Fun.Async.main. These effects are exposed to allow actions to be used by other schedulers. See an example here.
Effects for handling action invocations.
Invoke you must create an invocation for the action with Invocation.make and follow with the synchronization protocol. See Synchronizing.Invoke_poll you must create an invocation with Invocation.make and just try to poll the invocation. The code is always the same so you can just use do_invoke_poll to handle this.val do_invoke_poll :
?unblock:'a Primitive.t ->
'a t ->
('a option, unit) Stdlib.Effect.Deep.continuation ->
unitdo_invoke_poll action k does everything you need to do to handle the Invoke_poll effect with a continuation k. It can implemented using Invocation.make and Invocation.do_poll but it's always the same code, so here you have. For the argument unblock see Invocation.make.