# HG changeset patch # User Paul Boddie # Date 1244918270 -7200 # Node ID b39a4175bd022b2d9397a22fc64257078e88e4d6 # Parent 427c42d0e3c891eb5653de47041643a042dbf6e5 Changed the monitored files. Added some comments. diff -r 427c42d0e3c8 -r b39a4175bd02 examples/concurrency-sig/bottles.py --- a/examples/concurrency-sig/bottles.py Wed Jun 10 00:06:01 2009 +0200 +++ b/examples/concurrency-sig/bottles.py Sat Jun 13 20:37:50 2009 +0200 @@ -35,9 +35,11 @@ def multigrep(ch, pattern): queue = pprocess.Queue(continuous=1) multifollow = queue.manage(follow) - multifollow('test') # '/var/log/system.log' - multifollow('test2') - multifollow('test3') + + # Launch concurrent following activities. + multifollow('/tmp/test') # '/var/log/system.log' + multifollow('/tmp/test2') + multifollow('/tmp/test3') # Handle incoming lines using the specified pattern. grep(ch, queue, pattern) @@ -45,10 +47,13 @@ # Permit multiple simultaneous grep activities. queue = pprocess.Queue(continuous=1) multigrep = queue.manage(multigrep) + +# Launch concurrent grep activities. multigrep(".*pants.*") multigrep(".*trousers.*") multigrep(".*shorts.*") +# Print incoming lines. p = printer(queue) # vim: tabstop=4 expandtab shiftwidth=4 diff -r 427c42d0e3c8 -r b39a4175bd02 examples/concurrency-sig/bottles_heartbeat.py --- a/examples/concurrency-sig/bottles_heartbeat.py Wed Jun 10 00:06:01 2009 +0200 +++ b/examples/concurrency-sig/bottles_heartbeat.py Sat Jun 13 20:37:50 2009 +0200 @@ -40,9 +40,11 @@ def multigrep(ch, pattern): queue = pprocess.Queue(continuous=1) multifollow = queue.manage(follow) - multifollow('test') # '/var/log/system.log' - multifollow('test2') - multifollow('test3') + + # Launch concurrent following activities. + multifollow('/tmp/test') # '/var/log/system.log' + multifollow('/tmp/test2') + multifollow('/tmp/test3') # Handle incoming lines using the specified pattern. grep(ch, queue, pattern) @@ -50,10 +52,13 @@ # Permit multiple simultaneous grep activities. queue = pprocess.Queue(continuous=1) multigrep = queue.manage(multigrep) + +# Launch concurrent grep activities. multigrep(".*pants.*") multigrep(".*trousers.*") multigrep(".*shorts.*") +# Print incoming lines. p = printer(queue) # vim: tabstop=4 expandtab shiftwidth=4