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
2866081a
Commit
2866081a
authored
Jun 07, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3e4db57f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+19
-2
No files found.
wcfs/wcfs_test.py
View file @
2866081a
...
...
@@ -982,7 +982,11 @@ def test_wcfs():
ev
=
[]
def
_
(
ctx
):
print
()
print
(
'AAA'
)
raise
RuntimeError
(
'zzz'
)
pinv
=
wl
.
_expectPin
(
ctx
,
zf
,
pinok
)
print
(
'BBB'
)
ev
.
append
(
'pin rx'
)
tdelay
()
# XXX doc
...
...
@@ -1006,8 +1010,21 @@ def test_wcfs():
ev
.
append
(
'read pre'
)
# access data with released GIL so that the thread that reads data from
# head/watch can receive pin message.
b
=
read0_nogil
(
blk_data
)
# head/watch can receive pin message. Be careful to handle cancelation,
# so that on error in another worker we don't stuck and the error is
# successfully propagated to wait and reported.
have_read
=
chan
(
1
)
def
_
():
b
=
read0_nogil
(
blk_data
)
have_read
.
send
(
b
)
go
(
_
)
_
,
_rx
=
select
(
ctx
.
done
().
recv
,
# 0
have_read
.
recv
,
# 1
)
if
_
==
0
:
raise
ctx
.
err
()
b
=
_rx
ev
.
append
(
'read '
+
chr
(
b
))
# cancel _expectPin waiting upon waking up from read from wcfs
...
...
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