MCPcopy Create free account
hub / github.com/apache/mesos / generate

Function generate

3rdparty/libprocess/src/process.cpp:279–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277namespace ID {
278
279string generate(const string& prefix)
280{
281 static map<string, int>* prefixes = new map<string, int>();
282 static std::mutex* prefixes_mutex = new std::mutex();
283
284 int id;
285 synchronized (prefixes_mutex) {
286 int& _id = (*prefixes)[prefix];
287 _id += 1;
288 id = _id;
289 }
290 return prefix + "(" + stringify(id) + ")";
291}
292
293} // namespace ID {
294

Callers 15

HttpProxyMethod · 0.85
RuntimeProcessMethod · 0.85
ConnectionProcessMethod · 0.85
ProcessBaseMethod · 0.85
WaitWaiterMethod · 0.85
LatchMethod · 0.85
ReaperProcessMethod · 0.85
RemoteProcessMethod · 0.85
AsyncExecutorProcessMethod · 0.85

Calls 1

stringifyClass · 0.50

Tested by 15

RemoteProcessMethod · 0.68
TEST_PFunction · 0.68
createMethod · 0.68
HttpServerMethod · 0.68
BareBonesAgentProcessMethod · 0.68
TestSlaveProcessMethod · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
createFrameworkInfoMethod · 0.68
TEST_PFunction · 0.68
TEST_FFunction · 0.68