finalize#

LineSamplingGenerator.finalize()#

Perform any work required to close down the generator.

Optional. Performs any work required to close down the generator. Some generators may need to close down background processes, files, databases, or asynchronous components. After finalize is called, the generator’s data is guaranteed to be up to date, including results from any outstanding processes, threads, or asynchronous tasks.

>>> generator.finalize()