Hi I'm new here,

I'm also new to databases in general.

My question is about how SQLite handles multiple simultaneous reads and
writes.

It's my understanding that any number of reads can be going on
simultaneously (from other threads even) but ONLY ONE thread can write at a
time.  Is this correct?

Also, how would one handle multiple threads reading and writing
simultaneously if this is not the case?

I have a database that is being written to once a second and another thread
that tries to read ONCE from the same table being written to and write to
another separate table (this is when I would experience a crash).

I fixed the crash by handling an exception for "database locked" which
leads me to believe it was the second thread trying to write at the same
time that was the problem.

Thanks in advance,

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

Reply via email to