blob: d087bc8bfcb1d93ab34f4ba501d8a60d0da3fc46 [file] [log] [blame]
Vsevolod Tolstopyatov79414ec2018-08-30 16:50:56 +03001/*
2 * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3 */
4
5package kotlinx.coroutines.experimental.internal
6
7import kotlinx.coroutines.experimental.*
8import kotlin.coroutines.experimental.*
9
Roman Elizarovecbc85c2018-09-14 12:52:50 +030010/**
11 * This is a coroutine instance that is created by [coroutineScope] builder.
12 * It is just a vanilla instance of [AbstractCoroutine].
13 */
14internal class ScopeCoroutine<R>(
Vsevolod Tolstopyatov79414ec2018-08-30 16:50:56 +030015 parentContext: CoroutineContext
Roman Elizarovecbc85c2018-09-14 12:52:50 +030016) : AbstractCoroutine<R>(parentContext, true)
Vsevolod Tolstopyatov79414ec2018-08-30 16:50:56 +030017
18internal class ContextScope(context: CoroutineContext) : CoroutineScope {
19 override val coroutineContext: CoroutineContext = context
20}