Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    "but the processing would not be done in parallel because the GIL means that you're only ever using the resources of one CPU" GIL in multiprocessing how come .... ? Commented Oct 12, 2014 at 20:33
  • 8
    @NishantKashyap - Reread the sentence you took that quote from. Simon is talking about the processing of multiple threads - it's not about multiprocessing. Commented Jun 24, 2015 at 21:19
  • On memory differences these are in a capEx up-front cost sense. OpEx (running) threads can be just as hungry as processes. You have control of both. Treat them as costs. Commented Sep 7, 2017 at 12:24
  • @ArtOfWarfare can you explain why the accepted answer assumes multithreaded parallelism can be achieved if the GIL 'releases properly'? Commented Jun 21, 2019 at 17:21
  • @LoveenDyall - I'm not sure why you called me of all people out and are commenting on this answer instead of the one you're asking about, but that bullet point is talking about writing a Python extension in C. If you're dropping out of the Python Interpreter and into the land of native code, you can absolutely utilize multiple CPU cores without concern for the Global Interpreter Lock, because it is only going to lock the interpreter, not native code. Beyond that, I'm not sure what exactly they mean by releasing the GIL properly - I've never written Python extensions before. Commented Jun 21, 2019 at 18:01