CallSerializer (open)
Helper class that serializes call to functions (optionally coalescing them)
Syntax
LOADLIB "wh::async.whlib";
OBJECTTYPE CallSerializer
Variables
- STRING name (inherited from WaitableConditionBase)
name of this waitable condition, for debugging purposes
Properties
- PROPERTY signalled (inherited from WaitableConditionBase)
Whether the condition is signalled
Functions
- OBJECT FUNCTION Call(FUNCTION PTR func, VARIANT ARRAY args)
Call a function through the serializer, returns a promise for the function. The function will be called in a serialized manner.
- OBJECT FUNCTION GetRunPermission()
Get serialized run permission. Returns a running lock, call
Close
on that lock to release it. - OBJECT FUNCTION WaitNotSignalled() (inherited from WaitableConditionBase)
Returns a promise that be resolved when the status is or becomes not signalled
- OBJECT FUNCTION WaitSignalled() (inherited from WaitableConditionBase)
Returns a promise that be resolved when the status is or becomes signalled
- FUNCTION PTR FUNCTION Wrap(FUNCTION PTR func, RECORD options)
Wrap a function pointer, returns a proxy that will ensure the function will be called in a serialized manner.