requestTermination

Native
1.3
fun requestTermination(
    processScheduledJobs: Boolean = true
): Future<Unit>

(source)

Requests termination of the worker.

Returns Future that must be joined with Future.result blocking call. Failure to do so will leak native memory and underlying native thread handles.

Parameters

processScheduledJobs - controls is we shall wait until all scheduled jobs processed, or terminate immediately. If there are jobs to be execucted with executeAfter their execution is awaited for.