GeneratorSpawnTrySync (open)

This function asynchronously drives a generator function that yields promises. If the async generator doesn't yield or return a promise, the value is returned directly. Otherwise, a promise for the return value is returned.


// Core function, no LOADLIB necessary

VARIANT FUNCTION GeneratorSpawnTrySync(OBJECT generator)


OBJECT generator

Generator to run synchronously (if possible)

Return value


Generator return value (or promise for that value)