I would be interested in a version of SQLITE that handled threading in a much 
cleaner way. I have a need for a single process version that is threaded. 
 
 But, where  SQLITE locking is concerned each thread is really like a seperate 
Database connection. The locking occurs as a part of the Pager locking which is 
whole file for the duration of the transaction. AFAIK, the shared cache API is 
pretty worthless as the only way to implement this is through a single "server" 
thread. Which in that case whats the point of a shared cache? What is it shared 
against, since all threads must send data to the shared server anyways and none 
may access it concurrently.
 
 One thing that Other database engines do is allow read and writes to occur 
without blocking. That is a Reader never blocks a writer and a Writer never 
blocks a reader. SQLITE does not do this, Only a single writer or Multiple 
readers, but not both concurrently.
 
 I'm not trying to pick on sqlite, just pointing out that it really doesn't 
perform multi threading or even conncurrent access very well in a read/write 
environment. Read Only, its great. Single threaded Read/Write ... Very good as 
well.
 
 Regards,
 Ken
 
 
 
 

Doug Nebeker <[EMAIL PROTECTED]> wrote: > > Yes I did the same experiment with 
a lock that made thread A wait  
> > until B was finished. So actually only one thread can be active at
the time.
> > I don't see how the outcome of this experiment can be of  any 
> > interest, as there is no time reduction any longer. But your  guess
is 
> > right that, it works.
> 
>How would multiple threads be faster than a single one when you are
accessing a single resource?

Assumably the thread that is accessing the database either spends some
time gathering data to write
or processing data it read.  The single resource isn't in use during
that time.

This email was sent to you by Reuters, the global news and information company. 
To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender, 
except where the sender specifically states them to be the views of Reuters 
Limited.

Reuters Limited is part of the Reuters Group of companies, of which Reuters 
Group PLC is the ultimate parent company.
Reuters Group PLC - Registered office address: The Reuters Building, South 
Colonnade, Canary Wharf, London E14 5EP, United Kingdom
Registered No: 3296375
Registered in England and Wales



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------


Reply via email to