waitFor

open fun waitFor(@NonNull task: Runnable)

Wait for a specific task to finish running.

Parameters

task

the task to wait for, must be managed by Threads


open fun waitFor(@NonNull task: String)

Wait for a specific task to finish running.

Parameters

task

the name of the task to wait for, must be managed by Threads


open fun waitFor(@NonNull task: String, interrupt: Boolean)

Wait for a specific task to finish running, with the option to interrupt it.

Parameters

task

the name of the task to wait for, must be managed by Threads

interrupt

whether to interrupt the task first then wait


open fun waitFor(@NonNull task: Runnable, interrupt: Boolean)

Wait for a specific task to finish running, with the option to interrupt it.

Parameters

task

the task to wait for, must be managed by Threads

interrupt

whether to interrupt the task first then wait