]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Keep track of which thread-local contexts have been initialized
authorVincent Pit <vince@profvince.com>
Tue, 31 Mar 2015 19:15:40 +0000 (16:15 -0300)
committerVincent Pit <vince@profvince.com>
Tue, 31 Mar 2015 19:24:07 +0000 (16:24 -0300)
If you have two threads that are run in parallel, and the the module is
first loaded in one and then in the other, then our check functions might
be called in the second thread before the module's boot function is
executed. This is bad because the boot function is needed to initialize the
thread-local context, and this context is needed by the check functions.

To fix this, we keep track of which contexts were initialized thanks to a
refcounted pointer table.


No differences found