import { HandleStore } from "https://deno.land/x/willow@0.3.5/src/wgps/handle_store.ts";
A mapping of handles to data
Properties
private
eventuallyMap: Map<bigint, PromiseWithResolvers<ValueType>>private
map: Map<bigint, [ValueType, boolean, number]>A map of handles (numeric IDs) to a triple made up of:
- The bound data
- Whether we've asked to free that data (and in doing so committing to no longer using it)
- The number of unprocessed messages which refer to this handle.
Methods
canUse(handle: bigint)
decrementHandleReference(handle: bigint)
Indicates whether this a store of handles we have bound, or a store of handles bound by another peer.
getEventually(handle: bigint): Promise<ValueType>
incrementHandleReference(handle: bigint)
markForFreeing(handle: bigint)
[Symbol.iterator](): Iterator<[bigint, ValueType]>