Only between the initialization of the container and the first use of the
container by each thread. There are various ways you can implement that.
One, use DCL (double checked locking) that works (advanced topic) or
something like pthread_once that will initialize the container correctly.
Or, you can initialized the container before starting any reader threads.
The memory visibility rules for pthread_create guarantee that will work.
Everything visible to pthread_create will be visible to the created threads.
Or, have all the threads wait on a condition variable until the container
is initialized, e.g.
Initialization code sets flag when finished, sets the flag, signals
the condvar and releases the mutex.