function ObservableSubscriptionTable.Destroy(p)while next(p._subMap)do local X,S=next(p._subMap)p._subMap[X]=nil for p,X in pairs(S)do if X:IsPending()then task.spawn(function()X:Complete()end)end end end end return ObservableSubscriptionTable

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
