1.1 --- a/examples/concurrency-sig/bottles.py Wed Jun 10 00:06:01 2009 +0200
1.2 +++ b/examples/concurrency-sig/bottles.py Sat Jun 13 20:37:50 2009 +0200
1.3 @@ -35,9 +35,11 @@
1.4 def multigrep(ch, pattern):
1.5 queue = pprocess.Queue(continuous=1)
1.6 multifollow = queue.manage(follow)
1.7 - multifollow('test') # '/var/log/system.log'
1.8 - multifollow('test2')
1.9 - multifollow('test3')
1.10 +
1.11 + # Launch concurrent following activities.
1.12 + multifollow('/tmp/test') # '/var/log/system.log'
1.13 + multifollow('/tmp/test2')
1.14 + multifollow('/tmp/test3')
1.15
1.16 # Handle incoming lines using the specified pattern.
1.17 grep(ch, queue, pattern)
1.18 @@ -45,10 +47,13 @@
1.19 # Permit multiple simultaneous grep activities.
1.20 queue = pprocess.Queue(continuous=1)
1.21 multigrep = queue.manage(multigrep)
1.22 +
1.23 +# Launch concurrent grep activities.
1.24 multigrep(".*pants.*")
1.25 multigrep(".*trousers.*")
1.26 multigrep(".*shorts.*")
1.27
1.28 +# Print incoming lines.
1.29 p = printer(queue)
1.30
1.31 # vim: tabstop=4 expandtab shiftwidth=4