import threading


def spawn_thread(func, *args, **kwds):
    """
    Utility function for creating and starting a daemonic thread.
    """
    thr = threading.Thread(target=func, args=args, kwargs=kwds)
    thr.setDaemon(True)
    thr.start()
    return thr