Skip to content

Commit 4a1411b

Browse files
authored
server : fix missing lock (ggml-org#9334)
1 parent 8ebe8dd commit 4a1411b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ struct server_queue {
412412

413413
// multi-task version of post()
414414
int post(std::vector<server_task> & tasks, bool front = false) {
415+
std::unique_lock<std::mutex> lock(mutex_tasks);
415416
for (auto & task : tasks) {
416417
if (task.id == -1) {
417418
task.id = id++;

0 commit comments

Comments
 (0)