Commit 926c30b4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5b409637
...@@ -203,7 +203,7 @@ class tDB: ...@@ -203,7 +203,7 @@ class tDB:
# whether head/ ZBigFile(s) blocks were ever accessed via wcfs. # whether head/ ZBigFile(s) blocks were ever accessed via wcfs.
# this is updated only explicitly via ._blkheadaccess() . # this is updated only explicitly via ._blkheadaccess() .
t._blkaccessedViaHead = {} # ZBigFile -> set(blk) t._blkaccessedViaHead = {} # ZBigFile -> set(blk) XXX ZF -> foid ? (threads)
# tracked opened tFiles & tWatches # tracked opened tFiles & tWatches
t._files = set() t._files = set()
...@@ -689,7 +689,7 @@ class tWatchLink: ...@@ -689,7 +689,7 @@ class tWatchLink:
t._serveWG.go(t._serveRX) t._serveWG.go(t._serveRX)
# this tWatchLink currently watches the following files at particular state. # this tWatchLink currently watches the following files at particular state.
t._watching = {} # {} ZBigFile -> tWatch t._watching = {} # {} ZBigFile -> tWatch XXX ZBigFile -> foid
tdb._wlinks.add(t) tdb._wlinks.add(t)
...@@ -1883,8 +1883,8 @@ def zfiles(t): ...@@ -1883,8 +1883,8 @@ def zfiles(t):
# dump_history prints t's change history in tabular form. # dump_history prints t's change history in tabular form.
# #
# the output is useful while developing: to get overview of how file(s) are # the output is useful while developing or analyzing a test failure: to get
# changed in tests. # overview of how file(s) are changed in tests.
@func(tDB) @func(tDB)
def dump_history(t): def dump_history(t):
print('>>> Change history by file:\n') print('>>> Change history by file:\n')
...@@ -1908,6 +1908,15 @@ def dump_history(t): ...@@ -1908,6 +1908,15 @@ def dump_history(t):
print() print()
# ready reports whether chan ch is ready.
def ready(ch):
_, _rx = select(
default, # 0
ch.recv, # 1
)
return bool(_)
# xdefer is like defer, but makes sure exception raised before deferred # xdefer is like defer, but makes sure exception raised before deferred
# function is called is not lost. # function is called is not lost.
# #
...@@ -1939,12 +1948,3 @@ def _xdefer(f): ...@@ -1939,12 +1948,3 @@ def _xdefer(f):
# replace defer with xdefer # replace defer with xdefer
defer = xdefer defer = xdefer
del xdefer del xdefer
# ready reports whether chan ch is ready.
def ready(ch):
_, _rx = select(
default, # 0
ch.recv, # 1
)
return bool(_)
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