diff --git a/src/engineio/asyncio_client.py b/src/engineio/asyncio_client.py index 930c8f5..1c5e95a 100644 --- a/src/engineio/asyncio_client.py +++ b/src/engineio/asyncio_client.py @@ -166,11 +166,7 @@ def start_background_task(self, target, *args, **kwargs): :param args: arguments to pass to the function. :param kwargs: keyword arguments to pass to the function. - This function returns an object compatible with the `Thread` class in - the Python standard library. The `start()` method on this object is - already called by this function. - - Note: this method is a coroutine. + The return value is a ``asyncio.Task`` object. """ return asyncio.ensure_future(target(*args, **kwargs)) diff --git a/src/engineio/client.py b/src/engineio/client.py index 16ac5b4..4516d46 100644 --- a/src/engineio/client.py +++ b/src/engineio/client.py @@ -241,9 +241,9 @@ def start_background_task(self, target, *args, **kwargs): :param args: arguments to pass to the function. :param kwargs: keyword arguments to pass to the function. - This function returns an object compatible with the `Thread` class in - the Python standard library. The `start()` method on this object is - already called by this function. + This function returns an object that represents the background task, + on which the ``join()`` method can be invoked to wait for the task to + complete. """ th = threading.Thread(target=target, args=args, kwargs=kwargs) th.start() diff --git a/src/engineio/server.py b/src/engineio/server.py index e99de41..e15ff5e 100644 --- a/src/engineio/server.py +++ b/src/engineio/server.py @@ -452,9 +452,9 @@ def start_background_task(self, target, *args, **kwargs): :param args: arguments to pass to the function. :param kwargs: keyword arguments to pass to the function. - This function returns an object compatible with the `Thread` class in - the Python standard library. The `start()` method on this object is - already called by this function. + This function returns an object that represents the background task, + on which the ``join()`` methond can be invoked to wait for the task to + complete. """ th = self._async['thread'](target=target, args=args, kwargs=kwargs) th.start()