Skip to content

Instantly share code, notes, and snippets.

View main.lua
This file has been truncated, but you can view the full file.
---@diagnostic disable: deprecated
local ____modules = {}
local ____moduleCache = {}
local ____originalRequire = require
local function require(file, ...)
if ____moduleCache[file] then
return ____moduleCache[file].value
View Queue.ts
export default class Queue {
private items: Array<() => Promise<void>> = [];
private waker: (() => void) | null = null;
constructor() {
this.processQueue().catch((err) => {
throw new Error(`Failed to process a queue: ${err}`);
});
}