Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: one script at a time (race condition)

by roboticus (Chancellor)
on Mar 05, 2013 at 17:42 UTC ( #1021878=note: print w/ replies, xml ) Need Help??


in reply to one script at a time (race condition)

david2008:

I see you already have your problem solved. I wanted to mention, though, that instead of using a file, you could use the database itself. At the start of the run, check whether a lock entry exists in the table. If not, add an entry to the table. Do it in a transaction so you can avoid any race conditions. Then, when the run ends, delete the entry.

I only mention it because you're already pounding on the database.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re: one script at a time (race condition)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-30 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls