Thanks a lot for the response. Is there any way to identify which 
thread/process is actually blocking the reader thread or vise versa?
 
-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On
Behalf Of Simon Slavin
Sent: Thursday, March 13, 2014 2:30 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Reader locks writer in truncate mode?
 
 
On 13 Mar 2014, at 9:27pm, Igor Tandetnik <i...@tandetnik.org> wrote:
 
> On 3/13/2014 5:24 PM, veeresh kumar wrote:
>> In a multi-threaded application, say a reader
thread has read 100 records from the table and reading is still in progress
before which writer thread writes data and tries to commit. Its causing
database lock.Is this expected?
> 
> Assuming the two threads use two distinct database
connections - yes, this is expected.
 
Don't forget that by default SQLite does /no/ retries if
there is an access clash.  You can change
this by setting a timeout:
 
<https://sqlite.org/c3ref/busy_timeout.html>
 
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to