The generator function to complete.
Optional
maxTimePerTick: numberThe maximum time (in milliseconds) to spend on each tick before yielding control back to the system.
Optional
whileConditions: string | number | boolean | FunctionThe condition to continue running the generator. Can be a boolean, number, string, or function.
A promise that resolves with the final yielded value and the return value of the generator.
Asynchronously completes a generator function, yielding control back to the system if the execution time exceeds a specified limit per tick.