You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
+1
Original file line number
Diff line number
Diff line change
@@ -561,6 +561,7 @@ public final class kotlinx/coroutines/ThreadPoolDispatcherKt {
561
561
}
562
562
563
563
public final class kotlinx/coroutines/TimeoutCancellationException : java/util/concurrent/CancellationException, kotlinx/coroutines/CopyableThrowable {
564
+
public fun <init> (Ljava/lang/String;Lkotlinx/coroutines/Job;)V
564
565
public synthetic fun createCopy ()Ljava/lang/Throwable;
565
566
public fun createCopy ()Lkotlinx/coroutines/TimeoutCancellationException;
Copy file name to clipboardExpand all lines: kotlinx-coroutines-test/api/kotlinx-coroutines-test.api
+2
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,8 @@ public final class kotlinx/coroutines/test/TestScopeKt {
120
120
public static final fun getCurrentTime (Lkotlinx/coroutines/test/TestScope;)J
121
121
public static final fun getTestTimeSource (Lkotlinx/coroutines/test/TestScope;)Lkotlin/time/TimeSource;
122
122
public static final fun runCurrent (Lkotlinx/coroutines/test/TestScope;)V
123
+
public static final fun withTimeout (Lkotlinx/coroutines/test/TestScope;JLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
124
+
public static final fun withTimeout-dWUq8MI (Lkotlinx/coroutines/test/TestScope;JLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
123
125
}
124
126
125
127
public abstract interface class kotlinx/coroutines/test/UncaughtExceptionCaptor {
* This is an override of [kotlinx.coroutines.withTimeout] for [TestScope] that appends a note to
304
+
* [TimeoutCancellationException] saying that the timeout was affected by the virtual time.
305
+
* Below is the documentation for the original function.
306
+
*
307
+
* Runs a given suspending [block] of code inside a coroutine with a specified [timeout][timeMillis] and throws
308
+
* a [TimeoutCancellationException] if the timeout was exceeded.
309
+
* If the given [timeMillis] is non-positive, [TimeoutCancellationException] is thrown immediately.
310
+
*
311
+
* The code that is executing inside the [block] is cancelled on timeout and the active or next invocation of
312
+
* the cancellable suspending function inside the block throws a [TimeoutCancellationException].
313
+
*
314
+
* The sibling function that does not throw an exception on timeout is [withTimeoutOrNull].
315
+
* Note that the timeout action can be specified for a [select] invocation with [onTimeout][SelectBuilder.onTimeout] clause.
316
+
*
317
+
* **The timeout event is asynchronous with respect to the code running in the block** and may happen at any time,
318
+
* even right before the return from inside the timeout [block]. Keep this in mind if you open or acquire some
319
+
* resource inside the [block] that needs closing or release outside the block.
320
+
* See the
321
+
* [Asynchronous timeout and resources][https://kotlinlang.org/docs/reference/coroutines/cancellation-and-timeouts.html#asynchronous-timeout-and-resources]
322
+
* section of the coroutines guide for details.
323
+
*
324
+
* > Implementation note: how the time is tracked exactly is an implementation detail of the context's [CoroutineDispatcher].
* This is an override of [kotlinx.coroutines.withTimeout] for [TestScope] that appends a note to
350
+
* [TimeoutCancellationException] saying that the timeout was affected by the virtual time.
351
+
* Below is the documentation for the original function.
352
+
*
353
+
* Runs a given suspending [block] of code inside a coroutine with the specified [timeout] and throws
354
+
* a [TimeoutCancellationException] if the timeout was exceeded.
355
+
* If the given [timeout] is non-positive, [TimeoutCancellationException] is thrown immediately.
356
+
*
357
+
* The code that is executing inside the [block] is cancelled on timeout and the active or next invocation of
358
+
* the cancellable suspending function inside the block throws a [TimeoutCancellationException].
359
+
*
360
+
* The sibling function that does not throw an exception on timeout is [withTimeoutOrNull].
361
+
* Note that the timeout action can be specified for a [select] invocation with [onTimeout][SelectBuilder.onTimeout] clause.
362
+
*
363
+
* **The timeout event is asynchronous with respect to the code running in the block** and may happen at any time,
364
+
* even right before the return from inside the timeout [block]. Keep this in mind if you open or acquire some
365
+
* resource inside the [block] that needs closing or release outside the block.
366
+
* See the
367
+
* [Asynchronous timeout and resources][https://kotlinlang.org/docs/reference/coroutines/cancellation-and-timeouts.html#asynchronous-timeout-and-resources]
368
+
* section of the coroutines guide for details.
369
+
*
370
+
* > Implementation note: how the time is tracked exactly is an implementation detail of the context's [CoroutineDispatcher].
0 commit comments