<br><br><div class="gmail_quote">On Mon, Nov 5, 2012 at 12:17 PM, David Nicol <span dir="ltr"><<a href="mailto:davidnicol@gmail.com" target="_blank">davidnicol@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>                     $Q{$_}{READY} or next;</div><div>                     mkdir "QueueDir/$_/GOTIT", 0777 or next; # this will succeed once</div></blockquote><div><br></div><div>sorry, it's probably better to move the work unit into a per-worker queue directory,</div>
<div>which should also be atomic.</div><div><br></div><div>   rename "QueueDir/$_", "WorkerQs/$$/$_" or next;</div><div>   ...</div><div><br></div><div>these things are easy to do, and easy to do reusably, which is why there are so many</div>
<div>available.</div><div><br></div></div>