On 1/21/07, Andrew Teirney <[EMAIL PROTECTED]> wrote:
>
> > What is a 'shared' lock? You can't share a lock, only one process can
> > own it
> > at a time.
> >
>
> As per this document
>
> http://www.sqlite.org/lockingv3.html
>
> SHARED  The database may be read but not written. Any number of
> processes
> can hold SHARED locks at the same time, hence there can be many
> simultaneous readers. But no other thread or process is allowed to write
>
> to the database file while one or more SHARED locks are active.
>

A file lock is used to serialize write access. W hen reading the file is
not locked.
This makes little sense. There are no 'shared' locks.



Sorry, Accidently hit send before I was finished. This documentation needs
to be updated
so it makes sense. Making up this conceptual 'shared lock' thing instead of
explaining how
the locking mechanism really works is not helpful. A 'shared lock' in
reality is just opening
the disk file that makes up the database without locking. Any number of
other processes
can read the file. You can't acquire a shared lock, you just don't acquire a
write lock.


--
--
The PixAddixImage Collector suite:
http://groups-beta.google.com/group/pixaddix

SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

Reply via email to