[Python-ideas] Python3 Multitasking

Terry Jan Reedy tjreedy at udel.edu
Sat May 25 16:17:11 CEST 2013


On 5/25/2013 9:49 AM, Devyn Collier Johnson wrote:
> It may benefit many programmers if Python3 code could be multithreaded
> as easy as BASH code. For example, in BASH, if I wish to multithread a
> command, I put an ampersand at the end of the line.

Last I knew, that makes a separate process in sh and csh. Has that 
changed, or is bash different?

> Then, the BASH
> interpreter will execute that line while continuing the execution of the
> script instead of waiting to finish that command. For Python3, I have
> two ideas for how the Python3 multitasking syntax should look.
>
> Option 1: SOME_COMMAND &

> Option 2: multitask(SOME_COMMAND)

Check out the threading, multiprocessing, and subprocess modules.




More information about the Python-ideas mailing list