On 17 November 2016 at 02:34, roger peppe <[email protected]> wrote:

> +1 to using blocking flock. Polling is a bad idea with a heavily contended
> lock.
>
> FWIW I still think that mutexing all unit hooks is a bad idea
> that's really only there to paper over the problem that apt-get
> doesn't work well concurrently.
>

apt is just the one you commonly trip over. If there was no mutex, then
charms would need to do their own locking for every single resource they
need to access that might potentially also be accessed by a subordinate
(now or in the future), and hope subordinates also use the lock. So I think
mutexing unit hooks on the same machine is a fantastic idea :) Just
something innocuous like 'adduser' can collide with a subordinate wanting
to stick a config file in that user's home directory.


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

Reply via email to