News for hackers. Stuff that matters.
Re:Python Concurrency From the Ground Up (2015) [video] by nurettin on Wednesday November 11, 2020 @06:33AM (#25057487)
> GIL prevents you from using threads to achieve concurrency

I didn't watch, but nothing in python prevents concurrency. In Python, a lot of things prevent parallelism. Threads/async are ways of achieving concurrency in python. Parallelism is achieved using multiprocessing. It is inefficient, but it works.

Re:Python Concurrency From the Ground Up (2015) [video] by Geminidog on Wednesday November 11, 2020 @10:12AM (#25058998)
Also from certain perspectives parallelism is achieved with threads during IO.

So if 20 threads are making blocking IO calls, all 20 threads can make progress on those IO calls in parallel while having an additional parallel thread doing compute operations yielding a total of 21 threads executing in parallel.

Re:Python Concurrency From the Ground Up (2015) [video] by nurettin on Wednesday November 11, 2020 @11:29AM (#25059711)
We use "parallel" explicitly to mean "running on multiple cores scheduled by the kernel".
Re:Python Concurrency From the Ground Up (2015) [video] by Geminidog on Thursday November 12, 2020 @10:21AM (#25070775)
Yes, but "parallel" is also used in CS to specify multiple things happening at the same time including IO.

https://www.wikiwand.com/en/Parallel_computing

Quote: "Parallel computing is a type of computation where many calculations or the execution of processes are carried out simultaneously."

https://www.wikiwand.com/en/Parallel_communication

Quote: "In data transmission, parallel communication is a method of conveying multiple binary digits (bits) simultaneously. It contrasts with serial communication, which conveys only a single bit at a time; this distinction is one way of characterizing a communications link."

Re:Python Concurrency From the Ground Up (2015) [video] by quietbritishjim on Wednesday November 11, 2020 @07:26AM (#25057758)
Oops, you're right, I was talking about parallelism, not just concurrency. Thanks for the correction.

> Parallelism is achieved using multiprocessing.

As I said in my previous comment (but used the wrong term), threads are a perfectly reasonable way of getting parallelism in Python, so long so long your application uses C-based libraries like numpy (or even some built-in modules like zipfile). In my experience, the vast majority of Python programs that might need parallelism fall into that category (or are IO bound) anyway.