Commit 784445fd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e7b5eab2
......@@ -152,6 +152,9 @@ def close(wconn):
# _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)
def _pinner(wconn, ctx):
while 1:
......
......@@ -1712,6 +1712,13 @@ class tMapping(object):
dataok += b'\0'*(f.blksize - len(dataok)) # trailing zeros
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
# XXX assertData
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment