Best practice for variables shared between processes?
Roger Burton West
roger at firedrake.org
Mon Sep 20 17:30:10 BST 2010
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
More information about the london.pm
mailing list