Start a background task using the appropriate async model. This is a utility function that applications can use to start a background task using the method that is compatible with the selected async mode. :param target: the target function to execute. :param
(self, target, *args, **kwargs)
| 327 | self._reconnect_task.join() |
| 328 | |
| 329 | def start_background_task(self, target, *args, **kwargs): |
| 330 | """Start a background task using the appropriate async model. |
| 331 | |
| 332 | This is a utility function that applications can use to start a |
| 333 | background task using the method that is compatible with the |
| 334 | selected async mode. |
| 335 | |
| 336 | :param target: the target function to execute. |
| 337 | :param args: arguments to pass to the function. |
| 338 | :param kwargs: keyword arguments to pass to the function. |
| 339 | |
| 340 | This function returns an object that represents the background task, |
| 341 | on which the ``join()`` methond can be invoked to wait for the task to |
| 342 | complete. |
| 343 | """ |
| 344 | return self.eio.start_background_task(target, *args, **kwargs) |
| 345 | |
| 346 | def sleep(self, seconds=0): |
| 347 | """Sleep for the requested amount of time using the appropriate async |
no outgoing calls