monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] auto updates


From: Nathaniel Smith
Subject: Re: [Monotone-devel] auto updates
Date: Sun, 29 Oct 2006 00:36:18 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

On Sun, Oct 29, 2006 at 04:58:22PM +1100, Brian May wrote:
> Mybe I am still confused, I would have though that pulling from a database
> inside a hook that has been trigered by an update to that database would
> cause lock contention.
> 
> Anyway, I tried that, but monotone hangs for ever - at the pull inside the
> hook:

That's because the server is completely single-threaded, so it blocks
on processing everything else until the hook returns.

What your hook _can_ do is spawn an independent process and return
immediately, letting that process do its thing...

I don't know offhand if we have a spawn-in-background function exposed
to hooks, though even if we don't, you could hack it by executing the
shell and putting "&" at the end of your command line :-).

-- Nathaniel

-- 
"If you can explain how you do something, then you're very very bad at it."
  -- John Hopfield




reply via email to

[Prev in Thread] Current Thread [Next in Thread]