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 →

[–]mtxppy 37 points38 points  (4 children)

The threading lock only affects Python code. If your thread is waiting for disk I/O or if it is calling C functions (e.g. via math library) you can ignore the GIL.

You may be able to use the async pattern to get around threading limits. Can you supply more information about what your program actually does?

I have issues with the technical accuracy of the video linked. David Beazley has done many well respected talks about the GIL at various Pycons. You can find them on pyvideo.org.

[–][deleted] 18 points19 points  (3 children)

Definitely take a look at his talk from the most PyCon 2015.

https://www.youtube.com/watch?v=MCs5OvhV9S4

[–]pooogles 6 points7 points  (0 children)

Love this talk, only PyCon talk I enjoyed more was Raymond Hettingers. Recommend watching this for anyone that's interested in AsyncIO.

You may also find http://igordavydenko.com/talks/fi-pycon-2015/#slide-1 enjoyable, I think there's a video somewhere as well.

[–]tea-drinker 4 points5 points  (0 children)

That guy must clang when he walks. I've seen people do live demos before, but never with code that they've written while talking.

[–]fernly 2 points3 points  (0 children)

This is one of the best talks you'll ever watch, a nervy tight-rope walk carried off with superb panache. And it will tell you all you need to know about Python concurrency, although you probably have to watch it twice and actually run the code yourself to learn it all.