run_coro_thread_base

privex.helpers.asyncx.run_coro_thread_base(func: callable, *args, _daemon_thread=False, **kwargs)threading.Thread[source]

This is a wrapper function which runs coro_thread_func() within a thread, passing func, args and kwargs to it.

See the higher level run_coro_thread() for more info.

Parameters
  • func (callable) – A reference to the async def coroutine function that you want to run

  • args – Positional arguments to pass-through to the coroutine function

  • _daemon_thread (bool) – (Default: False) Must be specified as a kwarg. Controls whether or not the generated thread.Thread is set as a daemon thread or not.

  • kwargs – Keyword arguments to pass-through to the coroutine function

  • _output_queue (queue.Queue) – A queue.Queue for ;func:.coro_thread_func to transmit the coroutine’s result, or any raised exceptions via.

Return threading.Thread t_co

A started (but not joined) thread object for your caller to manage.