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/DelayedLazyVal

DelayedLazyVal

scala.concurrent.DelayedLazyVal
classDelayedLazyVal[T](f: ()=>T,body:=>Unit)(implicitexec:ExecutionContext)

ADelayedLazyVal is a wrapper for lengthy computations which have a valid partially computed result.

The first argument is a function for obtaining the result at any given point in time, and the second is the lengthy computation. Once the computation is complete, theapply method will stop recalculating it and return a fixed value from that point forward.

Value parameters

body

the computation to run to completion in another thread

f

the function to obtain the current value at any point in time

Attributes

Deprecated
[Since version 2.13.0]`DelayedLazyVal` Will be removed in the future.
Source
DelayedLazyVal.scala
Graph
Supertypes
classObject
traitMatchable
classAny

Members list

Value members

Concrete methods

defapply():T

The current result of f(), or the final result if complete.

The current result of f(), or the final result if complete.

Attributes

Returns

the current value

Source
DelayedLazyVal.scala

Whether the computation is complete.

Whether the computation is complete.

Attributes

Returns

true if the computation is complete.

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

[8]ページ先頭

©2009-2025 Movatter.jp