From c4182431ac7d9d306fdd2267e082fa4cec6fec2c Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:22:55 +0200 Subject: 5.12 --- zen/guid.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zen/guid.h') diff --git a/zen/guid.h b/zen/guid.h index 823f4431..0c03bd9f 100644 --- a/zen/guid.h +++ b/zen/guid.h @@ -28,7 +28,8 @@ namespace zen inline std::string generateGUID() //creates a 16 byte GUID { - boost::uuids::uuid nativeRep = boost::uuids::random_generator()(); //generator is thread-safe like an int + boost::uuids::uuid nativeRep = boost::uuids::random_generator()(); + //generator is only thread-safe like an int, so we keep it local until we need to optimize perf //perf: generator: 0.22ms per call; retrieve GUID: 0.12µs per call return std::string(nativeRep.begin(), nativeRep.end()); } -- cgit