Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.concurrent/Awaitable

Awaitable

scala.concurrent.Awaitable
traitAwaitable[+T]

An object that may eventually be completed with a result value of typeT which may be awaited using blocking methods.

TheAwait object provides methods that allow accessing the result of anAwaitable by blocking the current thread until theAwaitable has been completed or a timeout has occurred.

Attributes

Source
Awaitable.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Known subtypes
traitFuture[T]
objectnever

Members list

Value members

Abstract methods

defready(atMost:Duration)(implicitpermit:CanAwait):this.type

Await the "completed" state of thisAwaitable.

Await the "completed" state of thisAwaitable.

This method should not be called directly; useAwait.ready instead.

Value parameters

atMost

maximum wait time, which may be negative (no waiting is done),Duration.Inf for unbounded waiting, or a finite positive duration

Attributes

Returns

thisAwaitable

Throws

InterruptedException if the current thread is interrupted while waiting

TimeoutExceptionif after waiting for the specified time thisAwaitable is still not ready

Source
Awaitable.scala
defresult(atMost:Duration)(implicitpermit:CanAwait):T

Await and return the result (of typeT) of thisAwaitable.

Await and return the result (of typeT) of thisAwaitable.

This method should not be called directly; useAwait.result instead.

Value parameters

atMost

maximum wait time, which may be negative (no waiting is done),Duration.Inf for unbounded waiting, or a finite positive duration

Attributes

Returns

the result value if theAwaitable is completed within the specific maximum wait time

Throws

InterruptedException if the current thread is interrupted while waiting

TimeoutExceptionif after waiting for the specified time thisAwaitable is still not ready

Source
Awaitable.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp