Setting a timeout on a class method that relies on another class method, causes errors as the callback function loses the reference to this. The solution: hand on the initial this as parameter to the callback.
{ empty: function() { return true; }, process: function(self) { if(!self.empty()) { setTimeout( function() { self.process(self)}, 3000); } } } }