Best practice for variables shared between processes?

Dave Hodgkinson davehodg at gmail.com
Mon Sep 20 19:03:48 BST 2010


On 20 Sep 2010, at 17:30, Roger Burton West wrote:

> I wish to have two processes, a "producer" (which will create files) and
> a "consumer" (which will do something with them), running
> simultaneously. Ideally the producer would push filenames to a list as
> it finishes producing them, while the consumer would shift them off the
> same list (or loop-wait, if the list is empty).
> 
> What is the accepted best practice for achieving this effect in modern
> idiomatic Perl?
> 
> (Doesn't have to work on non-Unixlike platforms. Or even non-Linux ones,
> probably.)
> 
> (Also, this is all going to get spawned in response to something else;
> it won't be conveniently daemoniseable.)
> 
> Roger


Unbuffered stdout pushing to stdin on the consumer? just like the old days.


More information about the london.pm mailing list