The xtd::call_once struct can be used to execute a routine exactly once. This can be used to initialise data in a thread-safe way.