MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / pop_deferred_task

Method pop_deferred_task

smallthinker/tools/server/server.cpp:1633–1640  ·  view source on GitHub ↗

Call when the state of one slot is changed, it will move one task from deferred to main queue

Source from the content-addressed store, hash-verified

1631
1632 // Call when the state of one slot is changed, it will move one task from deferred to main queue
1633 void pop_deferred_task() {
1634 std::unique_lock<std::mutex> lock(mutex_tasks);
1635 if (!queue_tasks_deferred.empty()) {
1636 queue_tasks.emplace_back(std::move(queue_tasks_deferred.front()));
1637 queue_tasks_deferred.pop_front();
1638 }
1639 condition_tasks.notify_one();
1640 }
1641
1642 // end the start_loop routine
1643 void terminate() {

Callers 1

initMethod · 0.80

Calls 2

emptyMethod · 0.45
pop_frontMethod · 0.45

Tested by

no test coverage detected