CA = {} CA.TestCb = function(self, cb) if not self._cb then self._cb = function() cb() end end self._cb() end CA:TestCb(function() print("cb1") end) CA:TestCb(function() print("cb2") end)