diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:22:55 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:22:55 +0200 |
commit | c4182431ac7d9d306fdd2267e082fa4cec6fec2c (patch) | |
tree | 865cca543c062b7af2586f85cee19f9af4e7614d /zen/guid.h | |
parent | 5.11 (diff) | |
download | FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.gz FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.tar.bz2 FreeFileSync-c4182431ac7d9d306fdd2267e082fa4cec6fec2c.zip |
5.12
Diffstat (limited to 'zen/guid.h')
-rw-r--r-- | zen/guid.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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()); } |