RohitPatel9999 <rohitpatel9999-/[EMAIL PROTECTED]>
wrote:
While using SQLite dll Version 3.3.4 on Windows
- Multiple threads/processes access SQLite database,
- Each thread does some SELECTs, INSERTs or UPDATEs.

Wrapping all read-only SELECEs with BEGIN TRANSACTION
and using BEGIN EXCLUSIVE to wrap all UPDATEs or INSERTs (including
their related SELECTs),

Are their possibilities of writer starvation ?


With big enough time-out set up, there should not be. In the process of acquiring EXCLUSIVE lock, SQLite first acquires PENDING lock which allows existing readers to proceed but does not allow any new readers in. Once all the readers clear, the writer acquires EXCLUSIVE lock and can begin writing.

Igor Tandetnik

Reply via email to