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
Gwenaël Samain
cython
Commits
95be8c5a
Commit
95be8c5a
authored
6 years ago
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflect logic change in the nogil tests
parent
5c3982ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
nogil_test/nogil_extension.pyx
nogil_test/nogil_extension.pyx
+5
-5
No files found.
nogil_test/nogil_extension.pyx
View file @
95be8c5a
...
...
@@ -49,15 +49,15 @@ ccdef class SomeMemory:
cdef
int
a
;
cdef
double
b
;
c
cdef
void
cinit
(
self
,
a
,
b
)
:
c
def
void
cinit
(
self
,
a
,
b
)
nogil
:
# self.a = a
# self.b = b
pass
c
c
def
void
cdealloc
(
self
):
cdef
void
cdealloc
(
self
):
pass
c
c
def
void
foo1
(
self
):
cdef
void
foo1
(
self
):
"""
It is possible to define native C/Cython methods
that release the GIL (cool...)
...
...
@@ -82,7 +82,7 @@ ccdef class SomeMemory:
# cdef bar(): # it is currently impossible to release GIL
c
cdef
double
bar1
()
:
# yet this is what we would like to
c
def
double
bar1
()
nogil
:
# yet this is what we would like to
"""
This is a pure "cython method" which we would like to
be able to declare with nogil option but this requires
...
...
@@ -94,7 +94,7 @@ ccdef double bar1(): # yet this is what we would like to
return
o1
.
a
c
cdef
double
bar2
()
:
# yet this is what we would like to
c
def
double
bar2
()
nogil
:
# yet this is what we would like to
cdef
SomeMemory
o2
=
SomeMemory
(
2
,
2.0
)
o2
.
foo2
()
...
...
This diff is collapsed.
Click to expand it.
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