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

Re: Semaphore puzzle

by Corion (Patriarch)
on Feb 23, 2021 at 09:12 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2023-09-24 13:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found