Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Semaphore puzzle

by Corion (Patriarch)
on Feb 23, 2021 at 09:12 UTC ( [id://11128683]=note: print w/replies, xml ) Need Help??


in reply to Semaphore puzzle

Maybe I'm misunderstanding the problem. Why don't you lock one of the files or the database table you're importing into (or both)? You have a defined order in which they should be imported, so the program that gets launched to import the (defined) first file locks the file (and the table). The second program launched finds the file/table locked and just exits.

Replies are listed 'Best First'.
Re^2: Semaphore puzzle
by jerryhone (Sexton) on Feb 23, 2021 at 09:21 UTC
    It's all down to timing. There isn't the time to implement a lock (or a semaphore) before the other file is returned.
    I've reconsidered a complete redesign based on what I've encountered here, but there are multiple other moving parts and I have to go with what I have - for the moment anyway.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-19 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found