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
784445fd
Commit
784445fd
authored
Jul 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e7b5eab2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
wcfs/__init__.py
wcfs/__init__.py
+3
-0
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+7
-0
No files found.
wcfs/__init__.py
View file @
784445fd
...
@@ -152,6 +152,9 @@ def close(wconn):
...
@@ -152,6 +152,9 @@ def close(wconn):
# _pinner receives pin messages from wcfs and adjusts wconn mappings.
# _pinner receives pin messages from wcfs and adjusts wconn mappings.
#
# XXX must be running without GIL: access to wcfs mmaped memory could come from
# python code (thus with GIL taken).
@
func
(
Conn
)
@
func
(
Conn
)
def
_pinner
(
wconn
,
ctx
):
def
_pinner
(
wconn
,
ctx
):
while
1
:
while
1
:
...
...
wcfs/wcfs_test.py
View file @
784445fd
...
@@ -1712,6 +1712,13 @@ class tMapping(object):
...
@@ -1712,6 +1712,13 @@ class tMapping(object):
dataok
+=
b'
\
0
'
*
(
f
.
blksize
-
len
(
dataok
))
# trailing zeros
dataok
+=
b'
\
0
'
*
(
f
.
blksize
-
len
(
dataok
))
# trailing zeros
blkview
=
memoryview
(
t
.
mmap
.
mem
[
blk_inmmap
*
f
.
blksize
:][:
f
.
blksize
])
blkview
=
memoryview
(
t
.
mmap
.
mem
[
blk_inmmap
*
f
.
blksize
:][:
f
.
blksize
])
# XXX first access without GIL, so that e.g. if there is timeout on
# wcfs.py side, _abort_ontimeout could run and kill WCFS.
# FIXME also test with GIL locked, since wcfs.py pinner must be itself
# running without GIL.
_
=
read_nogil
(
blkview
[:
1
])
assert
_
==
dataok
[
0
]
assert
blkview
.
tobytes
()
==
dataok
assert
blkview
.
tobytes
()
==
dataok
# XXX assertData
# XXX assertData
...
...
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