News for hackers. Stuff that matters.
Re:Parallelising Python with Threading and Multiprocessing by wbsun on Saturday May 03, 2014 @04:13PM (#7692209)
Python threads, aren't they just single threaded execution?!
Re:Parallelising Python with Threading and Multiprocessing by sitkack on Saturday May 03, 2014 @04:59PM (#7692321)
Yes, they are concurrent but not parallel.
Re:Parallelising Python with Threading and Multiprocessing by deathanatos on Sunday May 04, 2014 @03:27AM (#7693628)
See other replies to the post you've replied to: threads in Python can be "parallel", if one of the threads releases the GIL. This can happen during calls to I/O, or more generally, any C call that decides to release the GIL. Most of the time, you're doing I/O anyways, so it suffices. If you're not (you're truly doing computation), then there is multiprocessing.
Re:Parallelising Python with Threading and Multiprocessing by dangoldin on Saturday May 03, 2014 @07:05PM (#7692660)
Yea - decent approach if you're doing a lot of IO but for computation you're limited by the GIL.
Re:Parallelising Python with Threading and Multiprocessing by sitkack on Saturday May 03, 2014 @09:39PM (#7693021)
People don't seem to understand this. If you are doing lots of IO Python threads are fully performant and the GIL isn't an issue at all.