It was possible for two threads to interleave their execution in such a
way that the map of hooks in the ::hooks metadata would be missing one
of the hooks.
This commit adds a second check of whether the ::hooks key has already
been added, this time inside alter-var-root's lock.
It was possible for two threads to interleave their execution in such a way that the map of hooks in the ::hooks metadata would be missing one of the hooks.
This commit adds a second check of whether the ::hooks key has already been added, this time inside alter-var-root's lock.