Hi, Danny Milosavljevic <dan...@scratchpost.org> skribis:
> On Thu, 08 Mar 2018 13:01:01 +0100 > l...@gnu.org (Ludovic Courtès) wrote: > >> So what’s your take on this? > > sqlite has a sqlite-unlock-notify. We should wrap it and use it when we get > the > "locked" error code. > > We should also enable extended error codes > https://sqlite.org/c3ref/extended_result_codes.html . > > See also https://sqlite.org/unlock_notify.html for a blocking version of > _step (to the right). Interesting. > Do we want cuirass to block until the lock is available? The POSIX thread itself should not block. Rather the fiber should yield to other fibers. So we could do the blocking-step within ‘non-blocking’ block as defined in (cuirass utils), though ‘non-blocking’ as currently implemented is a bit expensive. Or we could simply poll: catch those exceptions and try again later. If this is rare enough, as seems to be the case, that might be an acceptable approach. Thoughts? Ludo’.