CleanupGenerator: Stop a non-blocking generator worker process and cleanup.

Description Usage Arguments Details Value

Description

Because a generator loops indefinitely, when invoking non-blocking generators, child processes are always forked in background loading next batches. Even though the generators are not need anymore. Calling this function results in stopping the child process and any consequence IO.

Usage

1
CleanupGenerator(generator)

Arguments

generator

a generator function.

Details

This function force stops the multi-process generator and remove the function from its parent frame to make gc works.

Value

last result from generator(), invisibly.


imlijunda/AwkwardMLTools documentation built on May 13, 2019, 11:33 a.m.