in reply to Locking/unlocking program execution using a queue
Obviously you can use a database for this. It might be overkill though, but using transactions and the right isolation level can make for a very nice queue.
I guess an alternative is to have a directory that is used for locking. The directory would contain a mutex lock file that is used to show that a job is already running as well as a file per job queued up (you could use numeric increasing filenames to ensure the jobs are processed in order.) The process would look like this:
Anyway, thats probably what i would do if I wansnt going to to use a DB.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Locking/unlocking program execution using a queue
by RazorbladeBidet (Friar) on Mar 30, 2005 at 15:59 UTC | |
by gam3 (Curate) on Mar 30, 2005 at 23:41 UTC | |
|
Re^2: Locking/unlocking program execution using a queue
by cazz (Pilgrim) on Mar 30, 2005 at 15:41 UTC |