MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / read

Method read

tools/server/server-models.cpp:1076–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1074 cv.notify_all();
1075 }
1076 bool read(T & output, const std::function<bool()> & should_stop) {
1077 std::unique_lock<std::mutex> lk(mutex);
1078 constexpr auto poll_interval = std::chrono::milliseconds(500);
1079 while (true) {
1080 if (!queue.empty()) {
1081 output = std::move(queue.front());
1082 queue.pop();
1083 return true;
1084 }
1085 if (writer_closed.load()) {
1086 return false; // clean EOF
1087 }
1088 if (should_stop()) {
1089 close_read(); // signal broken pipe to writer
1090 return false; // cancelled / reader no longer alive
1091 }
1092 cv.wait_for(lk, poll_interval);
1093 }
1094 }
1095 bool write(T && data) {
1096 std::lock_guard<std::mutex> lk(mutex);
1097 if (reader_closed.load()) {

Callers 15

read_tensor_dataMethod · 0.45
load_tensorsMethod · 0.45
read_expected_outputFunction · 0.45
load_legacy_imatrixFunction · 0.45
mainFunction · 0.45
deserialize_stringFunction · 0.45
deserializeMethod · 0.45
multiple_choice_scoreFunction · 0.45
kl_divergenceFunction · 0.45
server_http_proxyMethod · 0.45
drainMethod · 0.45
handleStreamResponseMethod · 0.45

Calls 4

should_stopFunction · 0.85
emptyMethod · 0.45
popMethod · 0.45
loadMethod · 0.45

Tested by 3

read_expected_outputFunction · 0.36
drainMethod · 0.36
read_fileFunction · 0.36