Making sure script only runs once instance at a time.

MonkeeSage MonkeeSage at gmail.com
Tue Oct 3 00:36:37 EDT 2006


Eric S. Johansson wrote:
> the problem with this solution is that it does not handle the read
> nonexclusive/write exclusive locking model.  In this model, reads don't
> block, they only register that the request is in process.  writes lock
> request block until all outstanding reads have completed.  When there is
> a write lock waiting, all subsequent reads lock requests block until the
> write has completed.

I should have said "lock file" -- I'm not trying to do file locking for
concurrent access to a file; I'm trying to provide a lock file to
determine if an instance of a process is already spawned.

Regards,
Jordan




More information about the Python-list mailing list