> here's another way that should work: each record has a locking field
> in it. When qrunner wants to execute that item, it reads the field.
> If the field is NULL, it writes its ID (hwatever it is, guaranteed
> unique) into that locking field. It then waits a beat, and reads it
> back. if it reads back its own ID, it knows it owns the record and
> can execute it. If it reads back someone else's ID, it lost the lock,
> but someone else owns the record so it can skip it and move on.
Sorry if this is wandering a little off topic, but what's a `beat'?
A reads, gets NULL
B reads, gets NULL
A writes `A'
A waits a beat
A reads `A' and has the lock
B held up for a little writes `B'
B waits a beat
B reads `B' and also has the lock
I think I'm missing something and that's annoying :-)