Commit d8111b6e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4b588f69
...@@ -97,6 +97,7 @@ def main(): ...@@ -97,6 +97,7 @@ def main():
# change objects once in a while # change objects once in a while
if randint(0,4) == 0: if randint(0,4) == 0:
#print("T%s: modify" % name)
obj1.i += 1 obj1.i += 1
obj2.i += 1 obj2.i += 1
...@@ -112,7 +113,7 @@ def main(): ...@@ -112,7 +113,7 @@ def main():
for i in range(N): for i in range(N):
if ready(ctx.done()): if ready(ctx.done()):
break break
print('T1%s.%d' % (name, i)) #print('T%s.%d' % (name, i))
t1() t1()
raise RuntimeError("T1: done") raise RuntimeError("T1: done")
...@@ -155,7 +156,7 @@ def main(): ...@@ -155,7 +156,7 @@ def main():
N = 100000 N = 100000
wg = sync.WorkGroup(context.background()) wg = sync.WorkGroup(context.background())
for x in 'ab': for x in 'abcd':
wg.go(T1, x, N) wg.go(T1, x, N)
#wg.go(T2, N) #wg.go(T2, N)
wg.wait() wg.wait()
......
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