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

Method get_new_id

smallthinker/tools/server/server.cpp:1616–1620  ·  view source on GitHub ↗

Get the next id for creating a new task

Source from the content-addressed store, hash-verified

1614
1615 // Get the next id for creating a new task
1616 int get_new_id() {
1617 std::unique_lock<std::mutex> lock(mutex_tasks);
1618 int new_id = id++;
1619 return new_id;
1620 }
1621
1622 // Register function to process a new task
1623 void on_new_task(std::function<void(server_task &&)> callback) {

Callers 2

update_slotsMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected