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.jdk/FutureConverters

FutureConverters

scala.jdk.FutureConverters

This object provides extension methods that convert between Scalascala.concurrent.Future and Javajava.util.concurrent.CompletionStage

When writing Java code, use the explicit conversion methods defined injavaapi.FutureConverters instead.

Note that the bridge is implemented at the read-only side of asynchronous handles, namelyscala.concurrent.Future (instead ofscala.concurrent.Promise) andjava.util.concurrent.CompletionStage (instead ofjava.util.concurrent.CompletableFuture). This is intentional, as the semantics of bridging the write-handles would be prone to race conditions; if both ends (CompletableFuture andPromise) are completed independently at the same time, they may contain different values afterwards. For this reason,toCompletableFuture is not supported on the createdCompletionStages.

Attributes

Source
FutureConverters.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Type members

Classlikes

final implicitclassCompletionStageOps[T](cs:CompletionStage[T]) extendsAnyVal

Attributes

Source
FutureConverters.scala
Supertypes
classAnyVal
traitMatchable
classAny
final implicitclassFutureOps[T](f:Future[T]) extendsAnyVal

Attributes

Source
FutureConverters.scala
Supertypes
classAnyVal
traitMatchable
classAny

Implicits

Implicits

implicitdefFutureOps[T](f:Future[T]):FutureOps[T]

Attributes

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

[8]ページ先頭

©2009-2025 Movatter.jp