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
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
Joshua
wendelin.core
Commits
bb8587da
Commit
bb8587da
authored
Jan 16, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d29b0dae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
8 deletions
+5
-8
wcfs/client/_wcfs.pyx
wcfs/client/_wcfs.pyx
+1
-0
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+1
-1
wcfs/client/wcfs_misc.h
wcfs/client/wcfs_misc.h
+0
-4
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+1
-1
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+2
-2
No files found.
wcfs/client/_wcfs.pyx
View file @
bb8587da
...
...
@@ -267,6 +267,7 @@ cdef object pyerr(error err):
return
None
# XXX support for other errors? is it good idea?
# XXX -> errors.Is ?
if
err
.
eq
(
context
.
canceled
):
return
pycontext
.
canceled
if
err
.
eq
(
context
.
deadlineExceeded
):
...
...
wcfs/client/wcfs.cpp
View file @
bb8587da
...
...
@@ -130,7 +130,7 @@ error _Conn::close() {
reterr1
(
err
);
wconn
.
_pinCancel
();
err
=
wconn
.
_pinWG
->
wait
();
if
(
err
!=
context
::
canceled
)
// canceled - ok XXX check ok?
if
(
!
errors
::
Is
(
err
,
context
::
canceled
))
// canceled - ok
reterr1
(
err
);
// close all files - both that have no mappings and that still have opened mappings.
...
...
wcfs/client/wcfs_misc.h
View file @
bb8587da
...
...
@@ -51,10 +51,6 @@ using std::tie;
using
std
::
vector
;
// nil is synonym for nullptr and NULL. XXX -> pygolang
const
nullptr_t
nil
=
nullptr
;
// io:: XXX -> pygolang
namespace
io
{
...
...
wcfs/client/wcfs_watchlink.cpp
View file @
bb8587da
...
...
@@ -101,7 +101,7 @@ error _WatchLink::close() {
// XXX -> we now have `kill -QUIT` to wcfs.go on test timeout - remove ^^^ comments?
error
err2
=
wlink
.
_serveWG
->
wait
();
// canceled is expected and ok
if
(
err
2
==
context
::
canceled
)
// FIXME -> errors.Cause(err2) | errors.Is(err2, context::canceled
)
if
(
err
ors
.
Is
(
err2
,
context
::
canceled
)
)
err2
=
nil
;
error
err3
=
wlink
.
_f
->
close
();
...
...
wcfs/wcfs_test.py
View file @
bb8587da
...
...
@@ -948,7 +948,7 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None): # -> []event(str)
try
:
req
=
wlink
.
recvReq
(
ctx
)
except
Exception
as
e
:
if
e
is
context
.
canceled
:
if
e
is
context
.
canceled
:
# XXX -> errors.Is
return
# cancel is expected after f completes
raise
...
...
@@ -1984,7 +1984,7 @@ def procwait_(ctx, proc): # -> ok
try
:
procwait
(
ctx
,
proc
)
except
Exception
as
e
:
if
e
in
(
context
.
canceled
,
context
.
deadlineExceeded
):
if
e
in
(
context
.
canceled
,
context
.
deadlineExceeded
):
# XXX -> errors.Is
return
False
raise
return
True
...
...
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