Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
13ff4bd3
Commit
13ff4bd3
authored
Jul 14, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix (still unused by default) fast GIL sharing.
parent
460c77c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+13
-3
No files found.
Cython/Utility/ModuleSetupCode.c
View file @
13ff4bd3
...
...
@@ -949,6 +949,10 @@ static void __Pyx_FastGilFuncInit(void);
// To make optimal use of this thread local, we attempt to share it between
// modules.
#define __Pyx_FastGIL_ABI_module "_cython_" CYTHON_ABI
#define __Pyx_FastGIL_PyCapsuleName "FastGilFuncs"
#define __Pyx_FastGIL_PyCapsule \
__Pyx_FastGIL_ABI_module "." __Pyx_FastGIL_PyCapsuleName
#if PY_VERSION_HEX >= 0x03050000
#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
...
...
@@ -1029,12 +1033,18 @@ static void __Pyx_FastGilFuncInit0(void) {
}
}
if
(
__Pyx_FastGil_autoTLSkey
!=
-
1
)
{
PyObject
*
capsule
=
NULL
;
PyObject
*
abi_module
=
NULL
;
__Pyx_PyGILState_Ensure
=
__Pyx_FastGil_PyGILState_Ensure
;
__Pyx_PyGILState_Release
=
__Pyx_FastGil_PyGILState_Release
;
__Pyx_FastGIL_Remember
=
__Pyx_FastGIL_Remember0
;
__Pyx_FastGIL_Forget
=
__Pyx_FastGIL_Forget0
;
// Already fetched earlier, now we're just posting.
__Pyx_FetchCommonPointer
(
&
__Pyx_FastGilFuncs
,
"FastGilFuncs"
);
capsule
=
PyCapsule_New
(
&
__Pyx_FastGilFuncs
,
__Pyx_FastGIL_PyCapsule
,
NULL
);
abi_module
=
PyImport_AddModule
(
__Pyx_FastGIL_ABI_module
);
if
(
capsule
&&
abi_module
)
{
PyObject_SetAttrString
(
abi_module
,
__Pyx_FastGIL_PyCapsuleName
,
capsule
);
}
Py_XDECREF
(
capsule
);
}
}
...
...
@@ -1048,7 +1058,7 @@ static void __Pyx_FastGilFuncInit0(void) {
static
void
__Pyx_FastGilFuncInit
(
void
)
{
#if PY_VERSION_HEX >= 0x02070000
struct
__Pyx_FastGilVtab
*
shared
=
(
struct
__Pyx_FastGilVtab
*
)
PyCapsule_Import
(
"_cython_"
CYTHON_ABI
".FastGilFuncs"
,
1
);
struct
__Pyx_FastGilVtab
*
shared
=
(
struct
__Pyx_FastGilVtab
*
)
PyCapsule_Import
(
__Pyx_FastGIL_PyCapsule
,
1
);
#else
struct
__Pyx_FastGilVtab
*
shared
=
NULL
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment