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
0398e23d
Commit
0398e23d
authored
Jun 06, 2019
by
Kirill Smelkov
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X bytearray turned out to be copying data
-> use memoryview instead
parent
4283b91d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+6
-4
No files found.
wcfs/wcfs_test.py
View file @
0398e23d
...
...
@@ -115,7 +115,7 @@ def timeout(parent=context.background()): # -> ctx
# XXX
def
tdelay
():
time
.
sleep
(
1
0
*
time
.
millisecond
)
# XXX -> 1
ms ?
time
.
sleep
(
1
*
time
.
millisecond
)
# XXX -> 10
ms ?
# ---- test join/autostart ----
...
...
@@ -401,10 +401,10 @@ class tFile:
mm
.
unmap
(
t
.
fmmap
)
t
.
f
.
close
()
# blk returns
bytearray
view of file[blk].
# blk returns
memory
view of file[blk].
def
blk
(
t
,
blk
):
assert
blk
<=
t
.
_max_tracked
return
bytearray
(
t
.
fmmap
[
blk
*
t
.
blksize
:(
blk
+
1
)
*
t
.
blksize
])
return
memoryview
(
t
.
fmmap
[
blk
*
t
.
blksize
:(
blk
+
1
)
*
t
.
blksize
])
# cached returns [] with indicating whether a file block is cached or not.
# 1 - cached, 0 - not cached, fractional (0,1) - some pages of the block are cached some not.
...
...
@@ -973,8 +973,10 @@ def test_wcfs():
ev
.
append
(
'pin ack'
)
pin
.
ack
()
ev
.
append
(
'read pre'
)
assert
f
.
cached
()[
2
]
==
0
blk
=
f
.
blk
(
2
)
assert
f
.
cached
()[
2
]
==
0
ev
.
append
(
'read pre'
)
blk
[
0
]
# read access -> XXX without GIL
ev
.
append
(
'read post'
)
...
...
Kirill Smelkov
@kirr
mentioned in commit
58e2a88c
·
Oct 27, 2021
mentioned in commit
58e2a88c
mentioned in commit 58e2a88c7261ddeefb603bff6ffb2dcd9468bc86
Toggle commit list
Kirill Smelkov
@kirr
mentioned in commit
e3f2ee2d
·
Oct 28, 2021
mentioned in commit
e3f2ee2d
mentioned in commit e3f2ee2d7f18d5718817fd3a6e098b126946bbbc
Toggle commit list
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