ResolveTreeFuture

class ResolveTreeFuture constructor(componentContext: ComponentContext, component: Component, treeState: TreeState, currentRootNode: LithoNode?, perfEvent: PerfEvent?, resolveVersion: Int, useCancellableFutures: Boolean, syncWidthSpec: Int, syncHeightSpec: Int, componentTreeId: Int, extraAttribution: String?, source: Int) : TreeFuture<ResolveResult>

TODO(T137275959)

Constructors

Link copied to clipboard
constructor(c: ComponentContext, component: Component, treeState: TreeState, currentRootNode: LithoNode?, perfEvent: PerfEvent?, resolveVersion: Int, useCancellableFutures: Boolean, componentTreeId: Int, extraAttribution: String?, source: Int)
constructor(componentContext: ComponentContext, component: Component, treeState: TreeState, currentRootNode: LithoNode?, perfEvent: PerfEvent?, resolveVersion: Int, useCancellableFutures: Boolean, syncWidthSpec: Int, syncHeightSpec: Int, componentTreeId: Int, extraAttribution: String?, source: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

true if this future is interruptible.

Link copied to clipboard

true if an interrupt has been requested on this future, indicating the calculation must be resumed on the main-thread.

Link copied to clipboard

Returns true if this future has been released.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun getDescription(): String

Returns a String that gives a textual representation of the type of future it is.

Link copied to clipboard
open override fun getVersion(): Int

Returns an integer that identifies uniquely the version of this TreeFuture.

Link copied to clipboard
open override fun isEquivalentTo(that: TreeFuture<*>?): Boolean

Returns true if the provided TreeFuture is equivalent to this one.

Link copied to clipboard

Releases this TreeFuture

Link copied to clipboard

Synchronously executes the future task, ensuring the result is calculated, and resumed on the main thread if it is interrupted while running on a background thread.

Link copied to clipboard
fun tryRegisterForResponse(waitingFromSyncLayout: Boolean): Boolean

We want to prevent a sync layout in the background from waiting on an interrupted layout (which will return a null result). To handle this, we make sure that a sync bg layout can only wait on a NON_INTERRUPTIBLE future, and that a NON_INTERRUPTIBLE future can't be interrupted.

Link copied to clipboard