From a196211836efb555aede4fce4d161e7d327ca719 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 4 Apr 2008 13:03:24 +0200 Subject: * host/mex: - added support for asynchronous operations. --- host/mex/test/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'host/mex/test') diff --git a/host/mex/test/test.py b/host/mex/test/test.py index 48484486..bdb705a2 100644 --- a/host/mex/test/test.py +++ b/host/mex/test/test.py @@ -5,6 +5,7 @@ from mex.hub import Hub from mex.node import Node from mex.msg import Msg from mex.forked import Forked +import select def log (x): print x @@ -37,7 +38,11 @@ def c2 (): r = n.request (m) assert r.mtype == 0x82 assert r.pop ('B') == (43,) - n.wait (42) + n.wait_async (42) + while not n.sync (): + fds = select.select ((n, ), (), ())[0] + for i in fds: + i.read () n.wait () f2 = Forked (c2) -- cgit v1.2.3