-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/15/2010 06:48 PM, Igor Tandetnik wrote:
> Well, what trick? There is no way I know of for another process to get 
> notified of changes to the database. That is, other than polling, or a side 
> channel independent of SQLite.

One way I have done it in the past is to have a second database that is
exclusively locked by whoever does writing.  Waiters then also try a begin
immediate with infinite timeouts.  After the writer updates the main
database they release the lock on the second one which wakes up all the
waiters.  Rinse and repeat.

This is an extremely crappy signaling mechanism, but does work if the use
case is fully understood.  My reason for using it was because it works on
all platforms and saved me from having to come up with and test various
platform specific mechanisms.

Roger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwYNHAACgkQmOOfHg372QQcggCcDcPa2k0LCaQ8pMumMPT0dXdQ
ytEAn3TMFVGTfKn6EJxEoerRifV34tgT
=Eoem
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to