You don?t understand what I mean.
busy_timeout is also not the best solution. It can not know the exactly time when other handles unhold the lock. But lock and wait until other handles unhold the lock, it will restart immediatly. I just wonder why SQLite do so. ???? ???:Simon Slavinslavins at bigfraud.org ???:SQLite mailing listsqlite-users at mailinglists.sqlite.org ????:2016?4?6?(??)?13:31 ??:Re: [sqlite] Why SQLite use busy-retry but not lock-and-wait? On 6 Apr 2016, at 5:03am, sanhua.zh sanhua.zh at foxmail.com wrote: I found that on OS level, SQLite use file lock to solve multi-processes problem and use VFS to solve multi-threads problem. But all of them might failed with racing and SQLite will return a SQLITE_BUSY result code to make it sleep-and-retry. Use this call https://www.sqlite.org/c3ref/busy_timeout.html To tell SQLite to handle backoff-and-retry itself. Simon. _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users