routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
/**
* A counter that can be atomically incremented and decremented, and which
* callers can synchronously listen for it becoming non-zero.
*
* This can be "open" or "closed"; once it's closed, {@link wait} will no longer
* emit useful events.
*/
export declare class AtomicCounter {
/**
* The underlying BigInt64Array.
*
* The first BigInt64 represents the current value of the counter. The second
* BigInt64 is used to track the closed state.
*/
private readonly buffer;
constructor(buffer: SharedArrayBuffer);
/** Atomically decrement the current value by one. */
decrement(): void;
/** Atomically increment the current value by one. */
increment(): void;
/**
* Closes the counter.
*
* This will cause any outstanding calls to {@link wait} on any thread to
* return `true` immediately.
*/
close(): void;
/**
* Waits until the current value is not zero or the counter is closed.
*
* Returns `true` when the counter is non-zero *or* when it's closed. Returns
* `false` if the counter remains zero for `timeout` milliseconds.
*/
wait(timeout?: number): boolean;
}