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