--[=[
	Completes all subscriptions and removes them from the list.
]=]

function ObservableSubscriptionTable:Destroy()
	while next(self._subMap) do
		local key, list = next(self._subMap)
		self._subMap[key] = nil

		for _, sub in pairs(list) do
			if sub:IsPending() then
				task.spawn(function()
					sub:Complete()
				end)
			end
		end
	end
end


return ObservableSubscriptionTable
