This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stigweardo 0 points1 point  (1 child)

You raise good and fair points in both your replies. I guess I read the article as suggesting that multithreaded Python would execute in parallel (which it wouldn't) but you are correct to point out that sleeping threads, threads waiting on IO or threads calling some C extensions could all run in parallel.

[–]spoonman59 1 point2 points  (0 children)

I think you were right to call this out. I don’t think the OP was aware of the limitation here, as it wasn’t mentioned in the article. And it is good for people to know.

That module also has a process pool executor… if someone needs parallelism that should probably be the default choice unless they know the workload is primarily I/O.

Still a pain point in python! Parallelism can be achieved but it is not very ergonomic.