Formatting
This commit is contained in:
parent
2cdf2ba74e
commit
22cafda53f
4 changed files with 7 additions and 3 deletions
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* A type-safe utility function to create a Promise with resolve and reject functions.
|
||||
* @returns A tuple containing a Promise, a resolve function, and a reject function.
|
||||
*/
|
||||
export function createPromise<T = void>(): [
|
||||
Promise<T>,
|
||||
(value: T) => void,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { Logger } from "../tracing/logger";
|
|||
// Locks are granted in a first-in-first-out order.
|
||||
export class Locks<T> {
|
||||
private readonly locked = new Set<T>();
|
||||
private readonly waiters = new Map<T, (() => void)[]>();
|
||||
private readonly waiters = new Map<T, (() => unknown)[]>();
|
||||
|
||||
public constructor(private readonly logger: Logger) {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue