function Trove.AddPromise(Y,P)AssertPromiseLike(P)if P:getStatus()=="\083\116\097\114\116\101\100"then P:finally(function()return Y:_findAndRemoveFromObjects(P,false)end)Y:Add(P,"\099\097\110\099\101\108")end return P end

function Trove:AddPromise(promise)
	AssertPromiseLike(promise)
	if promise:getStatus() == "Started" then
		promise:finally(function()
			return self:_findAndRemoveFromObjects(promise, false)
		end)
		self:Add(promise, "cancel")
	end
	return promise
end

