2 msΒ·
This is VERY exciting: A PEP attacking one of the biggest problems with the CPython implementation: The Global Interpreter Lock. Will Python finally be rid of i
by EmilStenstrom 4y ago
This is VERY exciting: A PEP attacking one of the biggest problems with the CPython implementation: The Global Interpreter Lock. Will Python finally be rid of it after a decade of failed tries?
- PaulHoule 4y agoHow do you manage concurrency problems in Python code? I know they have answers for objects like ππππ and ππππ, but What is the equivalent of the Java ππ’ππππππππ£ππ keyword? Are you supposed to use primitives like π»πππ from https://docs.python.org/3/library/threading.html https://docs.python.org/3/library/threading.html It seems to me one could make a @ππ’ππππππππ£ππ annotation that would do nothing in a GIL Python but use a lock in a GIL-free Python.
- contentboot 4y ago>What is the equivalent of the Java ππ’ππππππππ£ππ keyword? The closest equivalent would be using a lock, semaphore or barrier object with a context manager .i.e. the with keyword. Making the locking and unlocking of data automatically managed for you. I generally try to stick to a deque in Python if I am doing anything concurrent.