2

Cython's documentation talks about releasing the GIL however it does not explain what exactly the GIL does or allows.

Similarly Python's documentation defines the GIL as: The mechanism used by the CPython interpreter to assure that only one thread executes Python bytecode at a time.

What does this actually mean? What are some (pseudo code) examples of what is possible if the GIL did not exist and what would not be allowed? How is the memory managed because of the GIL? For example are all objects copied for each thread?

DavidW
  • 29,336
  • 6
  • 55
  • 86
Greg
  • 8,175
  • 16
  • 72
  • 125
  • 1
    I can't give an actual, complete answer to this. So I'll just link to [this video](https://youtu.be/KVKufdTphKs) from Larry Hastings instead where he talks about the GIL and where 90% of my knowledge on the GIL stems from, in case you haven't seen it yet. – Arne Aug 28 '18 at 08:07
  • https://stackoverflow.com/questions/1294382/what-is-a-global-interpreter-lock-gil – rocksportrocker Sep 10 '18 at 08:39

0 Answers0