Comments (17)
Here's the PEP: https://peps.python.org/pep-0703/
from nogil.
@manueldeprada I'm currently working on a PEP (Python enhancement proposal). When it's ready, it will be posted to https://discuss.python.org/c/peps/ and I'll share a link to it here.
from nogil.
@redradist No, it won't be added to CPython 3.11. CPython 3.11 will have a "beta" release soon, which means a feature freeze (bug fixes only).
At the Python language summit this week I suggested integrating some of the "nogil" ideas into CPython 3.12 behind a compile flag. It's not clear if that will happen -- there's still a lot of open questions.
Having additional real use cases may help with adoption upstream. So if you have a program or use case that would benefit from removing the GIL, please try it out and report back both any problems you encounter and the results.
from nogil.
This should get into CPython. I'd love to have it in 3.11 with the fastness and this parallelism. Thanks @colesbury for such a detailed work. Appreciate all the efforts. Hope it's rewarded with a merge soon.
from nogil.
Hi, has your interesting PEP finally been accepted for integration into Python 3.12?
After a lot of drama back and forth, it has been accepted by the SC🎊🎊
Most discussion threads have been closed, the only I see now is: https://discuss.python.org/t/python-abis-and-pep-703/34018
but there is not a central active thread as far as I know. Probably, it will make it into 3.13😁😁
from nogil.
Is there any updated page where we can track what is being incorporated into Python 3.12??
from nogil.
Is there any updated page where we can track what is being incorporated into Python 3.12??
The what's new document keeps track of these things, the current one for 3.12 is available (and continuously updated).
Thank you. I see it's nowhere in the roadmap for 3.12. I was asking more for something like a link where we can follow the status and discussion of the NOGIL integration into Python.
Right now, I could only find some minutes from core-dev meetings and discussions on the mailing list.
It would be great if there was a central thread somewhere that tracked the discussion and status of the NOGIL integration into CPython.
from nogil.
Hi. It is really nice to see such a dedicated work for this. I want to contribute my real use case as follow:
Taken the inspiration from LMAX Disruptor written in Java, we (devs in a stock brokerage company) are developing in-memory queue system similar to Disruptor that heavily utilize shared-memory and concurrent model to achieve low-enough latency.
- Producer continuously put data into the shared buffer/shared list, but we construct it to be ring-buffer liked
- Consumers continuously poll for data from the shared buffer and consumer it
- No lock required if there is single producer
- Producer increase its offset when producing new data to shared buffer. Consumers observe it by polling to get producer's offset value (
while True
loop) - Producer also check for consumers offset to avoid wrapping the slowest consumers
To implement this, currently we are using multiprocessing
module with SharedMemory
class, each Consumer/Producer lives on separated process. Our producer and consumers are long-running processes.
Currently, due to the GIL, we are limited at communicating between producer and consumers (most likely sharing offset position). Consumers and producer using multiprocessing.Value
to share offset value, and that is not the efficient way to observe those values.
In multithreading model, I believe those operations will be more natural in the code, less work-around, and also we get more performance since threads share the same context, no need to pickle/copy data around.
from nogil.
I really appreciate the dedications to this work and it will be so nice to see it merge back to upstream. We should definitely push on this once things mature.
from nogil.
So say we all, but the timing is right: lot of people and money are working on python 5x speed-up goals.
from nogil.
@colesbury Looks like you are doing lots of work for updating to up-to-stream CPython ...
Will this nogil be added to CPython 3.11 ?
from nogil.
I've been looking forward to it.
from nogil.
and 3.12 is in development. I know that the summit it could add a compile option for nogil, but are there any updates on it?
from nogil.
Is there any updated page where we can track what is being incorporated into Python 3.12??
The what's new document keeps track of these things, the current one for 3.12 is available (and continuously updated).
from nogil.
Here's the PEP: https://peps.python.org/pep-0703/
For python-3.12 ?
from nogil.
from nogil.
Hi, has your interesting PEP finally been accepted for integration into Python 3.12?
from nogil.
Related Issues (20)
- Hitting the limit of open files on Linux when using selectors HOT 6
- definition not found: nogil-3.9.10-1 HOT 3
- NumPy is not supported a supported wheel on this platform HOT 6
- Nogil PyTorch threading issue when subclassing Tensor HOT 4
- Corner-case performance degradation HOT 4
- Missing Instruction.arg from dis.py and some operations from opcode.py HOT 1
- wheel for zstandard (fix for nogil) HOT 1
- Problems using Pandas and Numpy HOT 13
- Building wheels HOT 13
- Unable to install packages on windows using pip HOT 2
- Uploading this python version to aws layer HOT 5
- [Request] portable builds for Windows HOT 8
- [Performance Degradation] Unable to reproduce the example HOT 3
- an error occured when building the msi files HOT 2
- Correct C API Usage Logic for NO_GIL Multi-threading HOT 6
- Using PyInstaller with nogil python HOT 4
- Can't install nogil on MacOS. (arm64) HOT 3
- Docker image for arm64 HOT 3
- KeyError: b'error' in code.intern_identifier(self.attribute) with in Cython-3.0.8-nogil39-nogil HOT 3
- [rfe] - orphan branch with quilt patch queue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nogil.