Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
runtime
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cython-plus
runtime
Commits
27d45900
Commit
27d45900
authored
Sep 12, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove WaitResult implementation
parent
d7dba0fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
runtime.pxd
runtime.pxd
+0
-43
No files found.
runtime.pxd
View file @
27d45900
...
@@ -223,46 +223,3 @@ cdef cypclass BatchMailBox(SequentialMailBox):
...
@@ -223,46 +223,3 @@ cdef cypclass BatchMailBox(SequentialMailBox):
cdef
inline
ActhonResultInterface
NullResult
()
nogil
:
cdef
inline
ActhonResultInterface
NullResult
()
nogil
:
return
NULL
return
NULL
# Taken from:
# https://lab.nexedi.com/nexedi/cython/blob/3.0a6-cypclass/tests/run/cypclass_acthon.pyx#L66
cdef
cypclass
WaitResult
(
ActhonResultInterface
):
union
result_t
:
int
int_val
void
*
ptr
result_t
result
sem_t
semaphore
__init__
(
self
):
self
.
result
.
ptr
=
NULL
sem_init
(
&
self
.
semaphore
,
0
,
0
)
__dealloc__
(
self
):
sem_destroy
(
&
self
.
semaphore
)
@
staticmethod
ActhonResultInterface
construct
():
return
WaitResult
()
void
pushVoidStarResult
(
self
,
void
*
result
):
self
.
result
.
ptr
=
result
sem_post
(
&
self
.
semaphore
)
void
pushIntResult
(
self
,
int
result
):
self
.
result
.
int_val
=
result
sem_post
(
&
self
.
semaphore
)
result_t
_getRawResult
(
const
self
):
# We must ensure a result exists, but we can let others access it immediately
# The cast here is a way of const-casting (we're modifying the semaphore in a const method)
sem_wait
(
<
sem_t
*>
&
self
.
semaphore
)
sem_post
(
<
sem_t
*>
&
self
.
semaphore
)
return
self
.
result
void
*
getVoidStarResult
(
const
self
):
res
=
self
.
_getRawResult
()
return
res
.
ptr
int
getIntResult
(
const
self
):
res
=
self
.
_getRawResult
()
return
res
.
int_val
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