mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-12 03:31:46 +00:00
server : fix missing lock (#9334)
This commit is contained in:
parent
8ebe8ddebd
commit
4a1411b4f1
@ -412,6 +412,7 @@ struct server_queue {
|
|||||||
|
|
||||||
// multi-task version of post()
|
// multi-task version of post()
|
||||||
int post(std::vector<server_task> & tasks, bool front = false) {
|
int post(std::vector<server_task> & tasks, bool front = false) {
|
||||||
|
std::unique_lock<std::mutex> lock(mutex_tasks);
|
||||||
for (auto & task : tasks) {
|
for (auto & task : tasks) {
|
||||||
if (task.id == -1) {
|
if (task.id == -1) {
|
||||||
task.id = id++;
|
task.id = id++;
|
||||||
|
Loading…
Reference in New Issue
Block a user