IFClite TypeScript API
    Preparing search index...

    Type Alias GpuUploadOutcome<T>

    GpuUploadOutcome:
        | { ok: true; value: T }
        | { ok: false; reason: "device-lost" }
        | { deviceLostAtTime: boolean; error: unknown; ok: false; reason: "error" }

    The outcome of one guarded upload call.

    Type Parameters

    • T

    Type Declaration

    • { ok: true; value: T }
    • { ok: false; reason: "device-lost" }

      The device was already known lost; run() was never called.

    • { deviceLostAtTime: boolean; error: unknown; ok: false; reason: "error" }

      run() threw. deviceLostAtTime is isDeviceLost() re-checked AFTER the throw — the loss can latch (the async device.lost promise resolving, or a synchronous Safari throw) in the window between this call's own pre-check and the failing GPU call, so a caller that only trusted the pre-check would misreport that race as host memory pressure.