Re: [sqlite] Getting a notification when a write lock is released.

2019-08-16 Thread Jose Isaias Cabrera
test user, on Friday, August 16, 2019 02:29 PM, wrote... > > Thanks for the example José. You're welcome. Just thought I would provide some idea... :-) josé ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-16 Thread test user
Thanks for the example José. I was thinking of a more general method that would work when I do not control all of the clients. Your example would only work when all clients are aware of and use the locking logic. On Fri, Aug 16, 2019 at 3:39 PM Jose Isaias Cabrera wrote: > > test user, on

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-16 Thread Jose Isaias Cabrera
test user, on Thursday, August 15, 2019 07:35 PM, wrote... > The reason for the notification is to minimize time spent waiting. I will tell you what I did with 10 PMs working with a shared windows drive with an SQLite DB. But, take it with a grain of salt, unless you have high-blood pressure,

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-15 Thread test user
Thanks Simon, > You can use any other combination that suits you. Perhaps set a short > timeout, after which SQLite calls your busy handler, which can do whatever > it wants then return SQLITE_BUSY to your program. When the short timeout > gets exhausted, SQLite calls your own busy handler,

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-15 Thread Simon Slavin
On 15 Aug 2019, at 10:43pm, test user wrote: > Currently the API lets you set a timeout. Does this just retry again after a > set amount of time? SQLite's built-in busy handler (which it uses unless you tell it to use yours instead) repeatedly backs off and retries until the timeout you set

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-15 Thread test user
> > SQLite could support this in theory. But if the process holding the > lock is hung, that would hang the process waiting on the look too. > > Getting SQLITE_BUSY is annoying, but it is not nearly as annoying as > getting a > hung process. > > I am not aware of a way to do a blocking file

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-15 Thread Keith Medcalf
On Thursday, 15 August, 2019 13:11, test user wrote: >If two processes are writing to the same db file, one will get a BUSY >response if the other has locked it. >Currently the API lets you set a timeout. Does this just retry again >after a set amount of time? timeout specifies the time

Re: [sqlite] Getting a notification when a write lock is released.

2019-08-15 Thread Richard Hipp
On 8/15/19, test user wrote: > Hello, > > If two processes are writing to the same db file, one will get a BUSY > response if the other has locked it. > > Currently the API lets you set a timeout. Does this just retry again after > a set amount of time? Yes. It retries multiple times,

[sqlite] Getting a notification when a write lock is released.

2019-08-15 Thread test user
Hello, If two processes are writing to the same db file, one will get a BUSY response if the other has locked it. Currently the API lets you set a timeout. Does this just retry again after a set amount of time? Or is it possible to get notified immediately when the lock has been released? Can I