function Promise.new(W)local T=setmetatable({_pendingExecuteList={};_unconsumedException=true,_source=ENABLE_TRACEBACK and debug.traceback()or""},Promise)if type(W)=="\102\117\110\099\116\105\111\110"then W(T:_getResolveReject())end return T end

function Promise.new(func)
	local self = setmetatable({
		_pendingExecuteList = {};
		_unconsumedException = true;
		_source = ENABLE_TRACEBACK and debug.traceback() or "";
	}, Promise)

	if type(func) == "function" then
		func(self:_getResolveReject())
	end

	return self
end
