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

Method thaw

src/linux/cgroups.cpp:1335–1362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1333 }
1334
1335 void thaw()
1336 {
1337 Try<Nothing> thaw = internal::freezer::state(hierarchy, cgroup, "THAWED");
1338 if (thaw.isError()) {
1339 promise.fail(thaw.error());
1340 terminate(self());
1341 return;
1342 }
1343
1344 Try<string> state = internal::freezer::state(hierarchy, cgroup);
1345 if (state.isError()) {
1346 promise.fail(state.error());
1347 terminate(self());
1348 return;
1349 }
1350
1351 if (state.get() == "THAWED") {
1352 LOG(INFO) << "Successfully thawed cgroup "
1353 << path::join(hierarchy, cgroup)
1354 << " after " << (Clock::now() - start);
1355 promise.set(Nothing());
1356 terminate(self());
1357 return;
1358 }
1359
1360 // Attempt to thaw the freezer cgroup again.
1361 delay(Milliseconds(100), self(), &Self::thaw);
1362 }
1363
1364 Future<Nothing> future() { return promise.future(); }
1365

Callers

nothing calls this directly

Calls 11

stateFunction · 0.85
NothingClass · 0.85
MillisecondsClass · 0.85
errorMethod · 0.65
terminateFunction · 0.50
joinFunction · 0.50
delayFunction · 0.50
isErrorMethod · 0.45
failMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected