Movatterモバイル変換


[0]ホーム

URL:


    kotlinx.coroutines
kotlinx-coroutines-core/kotlinx.coroutines/Job

Job

funJob(parent:Job? =null):CompletableJob(source)

Creates a job object in an active state. A failure of any child of this job immediately causes this job to fail, too, and cancels the rest of its children.

To handle children failure independently of each other useSupervisorJob.

Ifparent job is specified, then this job becomes a child job of its parent and is cancelled when its parent fails or is cancelled. All this job's children are cancelled in this case, too.

Conceptually, the resulting job works in the same way as the job created by thelaunch { body } invocation (seelaunch), but without any code in the body. It is active until cancelled or completed. Invocation ofCompletableJob.complete orCompletableJob.completeExceptionally corresponds to the successful or failed completion of the body of the coroutine.

Parameters

parent

an optional parent job.


[8]ページ先頭

©2009-2025 Movatter.jp