Table of Contents

Class OverloadRunTable

Namespace
Hi.MachiningProcs
Assembly
HiMech.dll

Internal Use Only. The runs of one kind of overload (OverloadRunFold): the closed runs in step order, disjoint, each one OverloadRunTable.Run (24 B), and the open run, if any. Written by the fold's one writer and read by any thread without a lock. A closed run is written into the array and then published by the count (an array that is full is copied into a larger one, published before the run is written into it); the open run is an immutable record replaced whole; a run closes by first publishing its closed entry and then dropping the open record. A reader reads the open record, then the count, then the array — so a reader never finds a step of a run in neither table half, and a count read before the array names entries the array holds (an array published later holds every entry the count names, copied before its publication). A refold replaces the table whole: an enumeration (ClosedCount, GetClosed(int)) holds one table reference throughout, not the fold's property.

public sealed class OverloadRunTable
Inheritance
OverloadRunTable
Inherited Members
Extension Methods

Properties

ClosedCount

The closed runs so far.

public int ClosedCount { get; }

Property Value

int

Open

The open run — its Last is the last step observed, its totals are so far — or null when none is open.

public OverloadRunTable.Run? Open { get; }

Property Value

OverloadRunTable.Run?

Methods

GetClosed(int)

One closed run, by index in step order.

public OverloadRunTable.Run GetClosed(int index)

Parameters

index int

0 to ClosedCount − 1.

Returns

OverloadRunTable.Run

Exceptions

ArgumentOutOfRangeException

index names no closed run.

TryGet(int, out Run)

The run a step is in: the open one when the step is among its steps, else the closed one found by a binary search over the runs' first steps.

public bool TryGet(int stepIndex, out OverloadRunTable.Run run)

Parameters

stepIndex int

The step.

run OverloadRunTable.Run

The run; default when the step is in none.

Returns

bool

True when the step is in a run.