def start_task(self, func):
        """Start up a task"""
        task = self.loop.create_task(func(self))
        self._started_tasks.append(task)

        def done_callback(done_task):
            self._started_tasks.remove(done_task)

        task.add_done_callback(done_callback)
        return task
def start_task ( self , func ) : task = self . loop . create_task ( func ( self ) ) self . _started_tasks . append ( task ) def done_callback ( done_task ) : self . _started_tasks . remove ( done_task ) task . add_done_callback ( done_callback ) return task
Start up a task