klyn.threading.Thread.checkpoint
method
public static checkpoint() as Boolean
Description

Explicit cooperation point for the current thread. Waits while paused, unless stopping was requested. Never consumes the interruption flag. Call outside critical sections, then return or break when false so normal resource cleanup can run.

Returns

false if stopping was requested, true otherwise.

Example
while Thread.checkpoint():
    processNextBatch()