--- Coro/eg/prodcons3 2001/07/10 01:43:21 1.1 +++ Coro/eg/prodcons3 2006/11/06 19:40:02 1.4 @@ -1,12 +1,11 @@ #!/usr/bin/perl -# the classical producer/consumer example, using semaphores -# one process produces items, send s a signal. +# the classical producer/consumer example, using a channel +# one process produces items, sends a signal. # another process waits for that signal and # consumed the item. use Coro; -use Coro::Process; use Coro::Channel; use Coro::Signal; @@ -33,7 +32,7 @@ print "producer finished\n"; -yield while $work->size; +cede while $work->size; print "job finished\n";