On Tue, Feb 7, 2012 at 2:42 PM, Marc L. Allen
<mlal...@outsitenetworks.com>wrote:

> I'm trying to use sqlite in an embedded, multi-tasking  system with a very
> simple file system.  Essentially, it doesn't support having a file open
> multiple times.   That is, only one reader or writer.
>
> I have studied the code, but I can't quite tell how sqlite manages the DB
> files in a single process, multi-threaded environment.
>
> I would like to avoid funneling all DB requests through a single thread,
> and maximize concurrency by allowing multiple threads to access the DB at
> will.  I have some threads that might be doing relatively long read
> operations and really don't want to inhibit the occasional writes.
>
> Is this possible?  Or is OS level file sharing a firm requirement for
> multi-threaded operation?
>

The VFSes for unix and windows both open a separate file descriptor for
each database connection.  But there is no requirement to do this.  For the
custom VFS that you have to write to interface to your "very simple file
system" you can have all database connections share the same open file
connection.


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



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

Reply via email to