[Kc] Threads/fork/Event-based programming oh my (anyevent/coro)
David Nicol
davidnicol at gmail.com
Mon Nov 5 10:25:14 PST 2012
On Mon, Nov 5, 2012 at 12:17 PM, David Nicol <davidnicol at gmail.com> wrote:
> $Q{$_}{READY} or next;
> mkdir "QueueDir/$_/GOTIT", 0777 or next; # this will
> succeed once
>
sorry, it's probably better to move the work unit into a per-worker queue
directory,
which should also be atomic.
rename "QueueDir/$_", "WorkerQs/$$/$_" or next;
...
these things are easy to do, and easy to do reusably, which is why there
are so many
available.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20121105/a8263a17/attachment.html>
More information about the kc
mailing list