--- Coro/eg/prodcons2 2001/07/15 02:35:52 1.4 +++ Coro/eg/prodcons2 2006/11/06 19:40:02 1.6 @@ -1,7 +1,7 @@ #!/usr/bin/perl # the classical producer/consumer example, using semaphores -# one process produces items, send s a signal. +# one process produces items, sends a signal. # another process waits for that signal and # consumed the item. @@ -16,7 +16,7 @@ print "produced $i\n"; push @buffer, $i; $produced->up; - yield if @buffer > 5; # simulate memory pressure ;) + cede if @buffer > 5; # simulate memory pressure ;) } print "work done\n"; $finished->up;