MCPcopy Create free account
hub / github.com/apple/foundationdb / canLaunch

Method canLaunch

fdbserver/DataDistributionQueue.actor.cpp:375–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373 Busyness() : ledger(10, 0) {}
374
375 bool canLaunch(int prio, int work) const {
376 ASSERT(prio > 0 && prio < 1000);
377 return ledger[prio / 100] <= WORK_FULL_UTILIZATION - work; // allow for rounding errors in double division
378 }
379 void addWork(int prio, int work) {
380 ASSERT(prio > 0 && prio < 1000);
381 for (int i = 0; i <= (prio / 100); i++)

Callers 2

canLaunchSrcFunction · 0.80
canLaunchDestFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected