+ def taskCallback(self, task, res, stay_resident = False):
+ cb_idx = self.tasks.index(task)
+ if stay_resident:
+ if cb_idx not in self.resident_tasks:
+ self.resident_tasks.append(self.current_task)
+ print "task going resident:", task
+ else:
+ print "task keeps staying resident:", task
+ return