Add a threading.run convenience function

I think they can if the first argument can be (1) callable or a (2) non-total TypedDict with acceptable keys.

1 Like

Oh sure, kwargs can be added to the prototype:

def run(func, *args, kwargs=None, name=None, daemon=None, context=None):

In practice, it seems to be rare to call threading.Thread() with keyword arguments. In the whole Python stdlib, only multiprocessing pass kwargs in one function.

Later, we may add new keyword parameters to threading.Thread() constructor and threading.run(), like sigmask (see pthread_sigmask), stack_size (see thread.stack_size), or something else. It would be unfortunate to not accept these new parameters in the new run() function.