Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
ce8cb3db
Commit
ce8cb3db
authored
Dec 04, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4e111c94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
wcfs/internal/wcfs_test.pyx
wcfs/internal/wcfs_test.pyx
+5
-5
No files found.
wcfs/internal/wcfs_test.pyx
View file @
ce8cb3db
...
@@ -31,8 +31,8 @@ from posix.types cimport off_t
...
@@ -31,8 +31,8 @@ from posix.types cimport off_t
from
cpython.exc
cimport
PyErr_SetFromErrno
from
cpython.exc
cimport
PyErr_SetFromErrno
from
golang
cimport
pychan
,
select
,
panic
,
topyexc
from
golang
cimport
chan
,
pychan
,
select
,
panic
,
topyexc
from
golang
import
time
from
golang
c
import
time
# _tDB is pyx part of tDB.
# _tDB is pyx part of tDB.
cdef
class
_tDB
:
cdef
class
_tDB
:
...
@@ -52,7 +52,7 @@ cdef class _tDB:
...
@@ -52,7 +52,7 @@ cdef class _tDB:
# but, if _abort_ontimeout uses GIL, won't continue to run trying to lock
# but, if _abort_ontimeout uses GIL, won't continue to run trying to lock
# GIL -> deadlock.
# GIL -> deadlock.
def
_abort_ontimeout
(
_tDB
t
,
double
dt
,
pychan
nogilready
not
None
):
def
_abort_ontimeout
(
_tDB
t
,
double
dt
,
pychan
nogilready
not
None
):
cdef
pychan
timeoutch
=
time
.
after
(
dt
)
cdef
chan
[
double
]
timeoutch
=
time
.
after
(
dt
)
cdef
int
fdabort
=
t
.
_wcfuseabort
.
fileno
()
cdef
int
fdabort
=
t
.
_wcfuseabort
.
fileno
()
emsg1
=
"
\
n
C: test timed out after %.1fs
\
n
"
%
(
dt
/
time
.
second
)
emsg1
=
"
\
n
C: test timed out after %.1fs
\
n
"
%
(
dt
/
time
.
second
)
cdef
char
*
_emsg1
=
emsg1
cdef
char
*
_emsg1
=
emsg1
...
@@ -61,10 +61,10 @@ cdef class _tDB:
...
@@ -61,10 +61,10 @@ cdef class _tDB:
nogilready
.
chan_structZ
().
close
()
nogilready
.
chan_structZ
().
close
()
t
.
__abort_ontimeout
(
dt
,
timeoutch
,
fdabort
,
_emsg1
)
t
.
__abort_ontimeout
(
dt
,
timeoutch
,
fdabort
,
_emsg1
)
cdef
void
__abort_ontimeout
(
_tDB
t
,
double
dt
,
pychan
timeoutch
,
cdef
void
__abort_ontimeout
(
_tDB
t
,
double
dt
,
chan
[
double
]
timeoutch
,
int
fdabort
,
const
char
*
emsg1
)
nogil
except
+
topyexc
:
int
fdabort
,
const
char
*
emsg1
)
nogil
except
+
topyexc
:
_
=
select
([
_
=
select
([
timeoutch
.
chan_double
().
recvs
(),
# 0
timeoutch
.
recvs
(),
# 0
t
.
_closed
.
chan_structZ
().
recvs
(),
# 1
t
.
_closed
.
chan_structZ
().
recvs
(),
# 1
])
])
if
_
==
1
:
if
_
==
1
:
...
...
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