@@ -26,11 +26,14 @@ import kotlin.js.JsName
26
26
* Failure of one request will not cancel all streams in the others.
27
27
*/
28
28
@OptIn(InternalCoroutinesApi ::class )
29
- @Deprecated(" StreamScope is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html" , level = DeprecationLevel .WARNING )
29
+ @Deprecated(
30
+ " StreamScope is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html" ,
31
+ level = DeprecationLevel .WARNING
32
+ )
30
33
public class StreamScope internal constructor(
31
34
parentContext : CoroutineContext ,
32
35
internal val role : Role ,
33
- ): AutoCloseable {
36
+ ) : AutoCloseable {
34
37
internal class Element (internal val scope : StreamScope ) : CoroutineContext.Element {
35
38
override val key: CoroutineContext .Key <Element > = Key
36
39
@@ -171,7 +174,10 @@ public suspend fun <T> callScoped(callId: String, block: suspend CoroutineScope.
171
174
* }
172
175
* ```
173
176
*/
174
- @Deprecated(" streamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html" , level = DeprecationLevel .WARNING )
177
+ @Deprecated(
178
+ " streamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html" ,
179
+ level = DeprecationLevel .WARNING
180
+ )
175
181
@OptIn(ExperimentalContracts ::class )
176
182
public suspend fun <T > streamScoped (block : suspend CoroutineScope .() -> T ): T {
177
183
contract {
@@ -207,7 +213,10 @@ private fun CoroutineContext.checkContextForStreamScope() {
207
213
*/
208
214
@JsName(" StreamScope_fun" )
209
215
@ExperimentalRpcApi
210
- @Deprecated(" StreamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html" , level = DeprecationLevel .WARNING )
216
+ @Deprecated(
217
+ " StreamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html" ,
218
+ level = DeprecationLevel .WARNING
219
+ )
211
220
public fun StreamScope (parent : CoroutineContext ): StreamScope {
212
221
parent.checkContextForStreamScope()
213
222
0 commit comments