On Fri, 28 Jan 2011 10:45:19 +0100, Thomas Schwinge <
thomas@schwinge.name> wrote:
> > It would definitely be nice to avoid the complexity inherent in having a
> > daemon, but how do you imagine "queue on a lock" to work? We don't have
> > anything like that in place now.
>
> I suppose what he means is trying to get the lock, and if that fails wait
> a bit / wait until it is available again.
>
> Actually, as a next step, wouldn't it also be possible to add some
> heuristic to avoid ``notmuch new'' (being a low-priority task) blocking
> some interactive user (UI; high-priority task)? But we can pursue such
> schemes as soon as the basic infrastructure is in place.
Couldn't we pretty much get the desired behavior by using flock(2)?