-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/01/14 08:53, Ward Willats wrote:
> I found the UI thread and a worker thread, both in the DB, both in the
> default busy handler, both taking a 1 second sleep.
>
> I expected to see a third thread in the DB doing some work while the
> other two waited -- but no such thing.
The default busy handler (see sqliteDefaultBusyCallback in source) sleeps
for these amount of milliseconds:
{ 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 };
However on non-Windows if you do not have HAVE_USLEEP defined then it
sleeps with a granularity of one second. The blocking thread could have
finished after 10ms, but you'll still be stuck in the busy handlers for
another 990ms.
Simply ensure HAVE_USLEEP is defined when building sqlite3.c. Or add your
own busy handler that sleeps for sub-second amounts of time.
Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iEYEARECAAYFAlLO5gYACgkQmOOfHg372QQffACferRzozDtbmZqn+R/fVwxMKtf
rkYAn0oQDoHSne95rciPUlfqPCeN3yCv
=fAg3
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users