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

Method Latch

3rdparty/libprocess/src/latch.cpp:26–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24// spawn, a message send, a wait, and two user-space context-switchs.
25
26Latch::Latch() : triggered(false)
27{
28 // Deadlock is possible if one thread is trying to delete a latch
29 // but the libprocess thread(s) is trying to acquire a resource the
30 // deleting thread is holding. Hence, we only save the PID for
31 // triggering the latch and let the GC actually do the deleting
32 // (thus no waiting is necessary, and deadlocks are avoided).
33 pid = spawn(new ProcessBase(ID::generate("__latch__")), true);
34}
35
36
37Latch::~Latch()

Callers

nothing calls this directly

Calls 2

generateFunction · 0.85
spawnFunction · 0.70

Tested by

no test coverage detected