On Tue, Aug 9, 2016 at 10:17 AM, roger peppe <[email protected]>
wrote:

> BTW I'm not saying that a timer queue is never the correct answer. In some
> circumstances, it can be the exactly the right thing to use.
>

Yeah -- the context here is that katco has been looking at the provisioner,
and I think a timer queue is sensible there. Firing off goroutines for
every machine is not necessarily bad by any means, but it *is* somewhat
harder to get right in every circumstance (e.g. what happens when a machine
is removed while that other goroutine is working on provisioning it?).

There are certainly many places where a single retryable op *is* the only
important thing and there's no call for a control loop. I'm not suggesting
we should always use a queue; but I'd tend to encourage it whenever we have
a component dealing with many similar retryable tasks. (I definitely should
be using it in dependency.Engine, for example.)

Cheers
William
-- 
Juju-dev mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to