function Promise.defer(l)local d=debug.traceback(nil,2)local Z Z=Promise._new(d,function(Z,z,w)local J J=Promise._timeEvent:Connect(function()J:Disconnect()local n,c,f=runExecutor(d,l,Z,z,w)if not n then z(f[1])end end)end)return Z end

function Promise.defer(executor)
	local traceback = debug.traceback(nil, 2)
	local promise
	promise = Promise._new(traceback, function(resolve, reject, onCancel)
		local connection
		connection = Promise._timeEvent:Connect(function()
			connection:Disconnect()
			local ok, _, result = runExecutor(traceback, executor, resolve, reject, onCancel)

			if not ok then
				reject(result[1])
			end
		end)
	end)

	return promise
end
