--[=[
	@param onFlush ({T}) -> nil
	@return TaskQueue<T>
	Constructs a new TaskQueue.
]=]

function TaskQueue.new<T>(onFlush: ({T}) -> nil)
	local self = setmetatable({}, TaskQueue)
	self._queue = {}
	self._flushing = false
	self._flushingScheduled = false
	self._onFlush = onFlush
	return self
end

