robert-hooke icon indicating copy to clipboard operation
robert-hooke copied to clipboard

Fix race condition hooking a var from two threads

Open grammati opened this issue 8 years ago • 0 comments

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.

grammati avatar Dec 13 '15 23:12 grammati