This information is obsolete. You are looking at the
CVSTrac source management system display
for SQLite that was replaced by
Fossil on 2009-08-11. The
information shown here has not been updated since that cut-over.
These pages are retained for historical
reference only.

Page History

This sample code was contributed by Marcus Grimm on the sqlite-users mailing list on 2009-03-06 09:26:38

/***************************************************/
/** SQLITE 3 Thread Test Program **/
/** by Marcus Grimm **/
/** mgrimm<at>medcom-online.de **/
/***************************************************/
/** This program basically simulates a server **/
/** that opens multible DB connections that are **/
/** within multible threads. Each thread uses **/
/** his dedicated DB pointer. **/
/** The reader threads only parse some data of **/
/** some tables. **/
/** The write threads updates or inserts new data **/
/** in some tables randomly. **/
/** All writes into the DB are covered with **/
/** an exclusive transaction to lock the reader **/
/** threads and/or other writer threads **/
/** I don't use busy callback or busy timeout **/
/** settings here, since I do the busy handling **/
/** 'manually'. However, my handling here should **/
/** equivalent to what sqlite would do with its **/
/** internal busy handlers. **/
/** This code is public domain, you may use it **/
/** freely for whatever purpose. **/
/***************************************************/