No threading.start_new_thread(), useful addition?

Christian Heimes lists at
Thu Oct 8 17:35:57 CEST 2009

Ulrich Eckhardt wrote:
> No, as this one doesn't give me a handle to the thread. I also find this
> barely readable, for sure it doesn't beat the readability of the proposed
> function.

Roll your own convenient function, though. :) At work we have this short
function in our tool box:

def daemonthread(target, name=None, autostart=True, args=(), kwargs=None):
    """Start a thread as daemonic thread
    thread = Thread(target=target, name=name, args=args, kwargs=kwargs)
    if autostart:
    return thread


More information about the Python-list mailing list