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
cf164568
Commit
cf164568
authored
Nov 05, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cypclass unit tests with recursive locks
Recursive lock acquisition causes segmentation faults.
parent
cac09ba7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
53 deletions
+0
-53
tests/run/cypclass_lock.pyx
tests/run/cypclass_lock.pyx
+0
-53
No files found.
tests/run/cypclass_lock.pyx
deleted
100644 → 0
View file @
cac09ba7
# mode: run
# tag: cpp, cpp11, pthread
# cython: experimental_cpp_class_def=True, language_level=2
cdef
cypclass
A
checklock
:
int
a
__init__
(
self
):
self
.
a
=
0
int
getter
(
const
self
):
return
self
.
a
void
setter
(
self
,
int
a
):
self
.
a
=
a
def
test_basic_locking
():
"""
>>> test_basic_locking()
0
"""
obj
=
A
()
with
rlocked
obj
:
print
obj
.
getter
()
cdef
argument_recursivity
(
A
obj
,
int
arg
):
if
arg
>
0
:
obj
.
setter
(
obj
.
getter
()
+
1
)
argument_recursivity
(
obj
,
arg
-
1
)
def
test_argument_recursivity
(
n
):
"""
>>> test_argument_recursivity(42)
42
"""
obj
=
A
()
with
wlocked
obj
:
argument_recursivity
(
obj
,
n
)
print
obj
.
a
cdef
cypclass
Container
:
A
object
__init__
(
self
):
self
.
object
=
A
()
def
test_lock_traversal
(
n
):
"""
>>> test_lock_traversal(42)
42
"""
container
=
Container
()
with
rlocked
container
:
contained
=
container
.
object
with
wlocked
contained
:
argument_recursivity
(
contained
,
n
)
print
contained
.
getter
()
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