@vivliostyle/core
    Preparing search index...

    Class Fetcher<T>

    A class that can fetch or compute a resource that may be needed by multiple tasks. The first time a resource is requested, it is fetched and then given to everyone requesting it.

    function that fetches/computes a resource; it will be run in a separate task.

    Type Parameters

    • T
    Index

    Constructors

    Properties

    arrived: boolean = false
    fetch: () => Result<T>
    name: string
    piggybacks: ((p1: any) => void)[] = []
    resource: T = null
    task: Task = null

    Methods

    • Parameters

      • fn: (p1: T) => void

      Returns void

    • Start fetching/computing a resource, don't block current task.

      Returns void