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
e76f9f9a
Commit
e76f9f9a
authored
Apr 26, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
489e4f2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+8
-3
No files found.
wcfs/wcfs_test.py
View file @
e76f9f9a
...
...
@@ -370,14 +370,16 @@ class tWatch:
def
__init__
(
t
,
tdb
):
t
.
tdb
=
tdb
# open new head/watch handle.
#
# python/stdio lock file object on read/write
# however we need both read and write to be working simultaneously.
# -> we use 2 separate file objects for rx and tx.
#
# fdopen takes ownership of file descriptor and closes it when file
# object is closed -> we dup fd so that each file object has its own fd.
wh
=
os
.
open
(
tdb
.
path
(
"head/watch"
),
os
.
O_RDWR
)
wh2
=
os
.
dup
(
wh
)
# XXX temp?
wh2
=
os
.
dup
(
wh
)
t
.
wrx
=
os
.
fdopen
(
wh
,
'rb'
)
t
.
wtx
=
os
.
fdopen
(
wh2
,
'wb'
)
...
...
@@ -395,7 +397,10 @@ class tWatch:
def
close
(
t
):
t
.
tdb
.
_tracked
.
remove
(
t
)
t
.
_send
(
1
,
b'bye'
)
# ask wcfs to close its tx & rx sides; close(wcfs.tx) wakes up _serveRecv
# ask wcfs to close its tx & rx sides; close(wcfs.tx) wakes up
# _serveRecv on client (= on us).
t
.
_send
(
1
,
b'bye'
)
t
.
_serveDone
.
recv
()
t
.
wtx
.
close
()
...
...
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