Patent ID: 9582316
Date: 2017-02-28
CPC Classifications: G06F

Claim:
1. A blocking method performed on a computer that includes at least one processor and memory, the blocking method for initializing data in a multi-threaded environment, the blocking method comprising: creating, by the computer prior to an attempt by a first-in-time thread to initialize the data, an initialization primitive that is configured for indicating each of three states of the data, the three states comprising: uninitialized, initializing, and initialized; allowing, in response to the attempt to initialize the data and to the initialization primitive indicating that the data is in the uninitialized state, continued execution of the first-in-time thread that is one of a plurality of threads all being concurrently executed by the at least one processor, where the data is shared among the plurality of threads; blocking, in response to any attempt by any of the plurality of threads that is not the first-in-time thread to initialize the data and in response to the initialization primitive indicating that the data is in the initializing state, continued execution of the any of the plurality of threads that is not the first-in-time thread; and transitioning, based on the allowing, the initialization primitive to indicate that the data is in the initializing state.