MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / handle_generic_run

Method handle_generic_run

app/server/runtime.cpp:688–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686 }
687 }
688 // `loading` itself will occupy one slot, so at most limit - 1 others may stay.
689 int to_evict = static_cast<int>(resident.size()) - (limit - 1);
690 if (to_evict <= 0) {
691 return;
692 }
693 std::sort(resident.begin(), resident.end(), [](const LoadedModel * a, const LoadedModel * b) {
694 return a->last_used_ms.load(std::memory_order_relaxed) <
695 b->last_used_ms.load(std::memory_order_relaxed);
696 });
697 for (LoadedModel * victim : resident) {
698 if (to_evict == 0) {
699 return;
700 }

Callers

nothing calls this directly

Calls 5

parseFunction · 0.85
build_request_from_jsonFunction · 0.85
json_responseFunction · 0.85
task_result_jsonFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected