Header menu logo B2R2

WeakBucketTable<'T> Type

Represents a thread-safe weak interning table. Values are grouped by a caller-supplied hash, and each bucket stores only weak references to the interned values.

Constructors

Constructor Description

WeakBucketTable(equals, initialize, ?cleanupThreshold)

Full Usage: WeakBucketTable(equals, initialize, ?cleanupThreshold)

Parameters:
    equals : 'T -> 'T -> bool
    initialize : 'T -> int -> unit
    ?cleanupThreshold : int

Returns: WeakBucketTable<'T>
equals : 'T -> 'T -> bool
initialize : 'T -> int -> unit
?cleanupThreshold : int
Returns: WeakBucketTable<'T>

Instance members

Instance member Description

this.BucketCount

Full Usage: this.BucketCount

Returns: int

Gets the number of hash buckets currently stored in the table.

Returns: int

this.Clear

Full Usage: this.Clear

Removes all buckets and weak references from the table.

this.Count

Full Usage: this.Count

Returns: int

Gets the number of weak references currently stored in the table. Dead references may be included until a cleanup runs.

Returns: int

this.Intern

Full Usage: this.Intern

Parameters:
    value : 'T
    hash : int

Returns: 'T

Finds the live canonical value equal to , or initializes and inserts when none exists.

value : 'T
hash : int
Returns: 'T

this.Sweep

Full Usage: this.Sweep

Removes dead weak references from every bucket.

Type something to start searching.