-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 703 -- Decide on a replacement name for Py_NOGIL
macro (or keep as is)
#214
Comments
I propose to name the feature "multicore". I have used this to describe the proposal to a few folks who are highly technical but not into Python minutiae and it instantly makes it clear what we're talking about. We could start with I just learned from the Discourse thread that OCaml calls it that too. (Even though Wikipedia spells it "Multi-core Processor" I think that in common parlance the hyphen is going out of style for this particular concept, so I propose "multicore" as a single word.) |
+1 for hyphenless "multicore": I agree it's instantly understandable, much more so than "free threaded". Multicore was also suggested in this Discourse thread and received many upvotes:
|
Strong -1 on "multicore". This is really misleading and bordering on FUD. |
The very fact that being multi-core is a property of CPUs (i.e. physical devices), not programming languages, should hint that this does not convey the right meaning. |
"unlocked"? |
Personal take having observed some of our Discord chatter on this topic in the last month: I think we're fine with The C macro name is more interesting. We should probably avoid #ifdef Py_GIL_ENABLED
// Older code take locking via the GIL for granted as we don't release it.
#else
// Modern code! maintain our own localized lock.
#endif #ifndef Py_GIL_ENABLED
// "Our immediate concern is our family atomics. We must get them before the Harkonnens" - Dune
#endif I'm also okay with |
(from the discuss thread given there is passion about the "multicore" term, i'd lean away from it from an SC community consensus decision point of view) |
Python and its ecosystem already offer ways to fully exploit multicore setups, such as So this would be disparaging past and existing efforts, and misrepresenting what is possible using "traditional" CPython. (it would also be woefully vague) I think |
@gpshead a macro like
|
Good point (and me re-skipping pep bits too quickly). That'd also have applied to |
I don't see why. This would be undefined on older versions, only defined in 3.13+ on no-GIL builds, and eventually always be defined. I'll leave it up to the SC to decide on the proper branding though. That's why I resigned as BDFL in 2018. :-) |
Okay, the SC discussed this and others on the SC just told me to be decide so lets go with |
PEP 703 specifies that the
Py_NOGIL
macro designates--disable-gil
builds. The steering council has written that they would "like a positive, clear term to talk about the no-GIL build".I would prefer the steering council to decide on a replacement name (if any) because the community discussions have not reached any consensus about naming.
@hugovk has suggested a two possible replacement names:
Py_DISABLE_GIL
(which matches the--disable-gil
configure flag)Py_FREE_THREADED
@gvanrossum suggested (in a comment below):
Py_MULTICORE
(with a corresponding--enable-multicore
configure flag)Whatever name is chosen will be used by C code as well as exposed through
sysconfig
.Note that labeling the default (with GIL) build with a macro like
Py_GIL
orPy_WITH_GIL
would not work well because it would not be defined in older versions of Python, and that would make writing the#if
pre-processor guards more difficult for extensions that targets multiple versions of Python.This is not super urgent, but it would be helpful to have a decision within the next few months before we start relying on the macro in C API extensions.
See also:
Py_NOGIL
to a positive term cpython#111863Py_NOGIL
toPy_GIL_DISABLED
cpython#111864The text was updated successfully, but these errors were encountered: