multithread safe definition of shared constants