[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] vfs implementation question
From: Richard Klein <Richard.Klein () schange ! com>
Date: 2008-08-19 21:45:19
Message-ID: 48AB3EEF.80600 () schange ! com
[Download RAW message or body]
D. Richard Hipp wrote:
> On Aug 19, 2008, at 9:02 AM, Jeffrey Becker wrote:
>
>
>> Should the xLock member of sqlite3_io_methods object block until the
>> lock can be acquired?
>
> xLock does not block on any of the built-in VFSes. But if you want to
> make your own custom VFS that blocks on locks, I don't know of any
> reason why that wouldn't work.
I wrote a custom VFS that blocks on locks, and it works just fine.
I also implemented a subset of the five locking levels of SQLite:
just UNLOCKED and EXCLUSIVE. This means that as soon as a transaction
asks for a SHARED lock, it actually gets an EXCLUSIVE lock, which
locks out all other transactions until the first one commits.
This works fine in an embedded application where there are only a
few threads, whose transactions execute quickly.
- Richard Klein
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic