On Nov 2, 2010, at 5:12 PM, Andy Gibbs wrote:

> Hi,
>
> I was looking at the diff to threadtest3.c in recent commit at
> http://www.sqlite.org/src/fdiff?v1=58df1e3c060f534f&v2=d6d209190c7110f9 
> , and
> I think I may have spotted an mistake in the code at the end of the  
> function
> "static void dynamic_triggers(int nMs)".
>
> The code here runs as follows:
>
> [... snip ...]
>
> sqlite3_enable_shared_cache(1);
> launch_thread(&err, &threads, dynamic_triggers_2, 0);
> launch_thread(&err, &threads, dynamic_triggers_2, 0);
> sqlite3_enable_shared_cache(0);
>
> sleep(2);
>
> launch_thread(&err, &threads, dynamic_triggers_2, 0);
> launch_thread(&err, &threads, dynamic_triggers_1, 0);
>
> [... snip ...]
>
>
> Should it not be launching both dynamic_triggers_1 and  
> dynamic_triggers_2 in
> the first instance, like it does in the second instance?

Fair question. But in this case no. The idea was to have one
thread modifying the triggers. Then several other reader threads
using the database with the reader threads using both shared and
unshared caches.

Dan.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to