[Python-Dev] Starting a new thread

2022-05-10 Thread Barney Stratford
Hello all. It occurs to me that creating threads in Python is more awkward than it needs to be. Every time I want to start a new thread, I end up writing the same thing over and over again: def target(*args, **kwds): ... t = threading.Thread(target = target, args = , kwargs= ) t.start() Th

[Python-Dev] Re: Starting a new thread

2022-05-10 Thread Barney Stratford
> 1. Does t = target(...) start the thread? I think it does. I think it does too. In the commonest use case, immediately after creating a thread, you start it. And if you want to delay the thread but still use the decorator, then you can do that explicitly with some locks. In fact, it’s probably

[Python-Dev] Re: Starting a new thread

2022-05-12 Thread Barney Stratford
It seems like the consensus is that this is a good idea, but it’s the wrong good idea. Should I cancel the PR or should we try to make it into a better good idea? Cheers, Barney. ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send