From: Vincent Pit Date: Tue, 31 Mar 2015 19:15:40 +0000 (-0300) Subject: Keep track of which thread-local contexts have been initialized X-Git-Tag: rt100068~2 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=0b3fd3ca50b788eb9ba7b9a1a3fbdb2266d6a40f;hp=0b3fd3ca50b788eb9ba7b9a1a3fbdb2266d6a40f;p=perl%2Fmodules%2Findirect.git Keep track of which thread-local contexts have been initialized 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. ---