liverpool: queue::pop takes the front element

This commit is contained in:
IndecisiveTurtle 2025-02-24 13:24:45 +02:00
parent d044e378b5
commit ea78e4d636

View File

@ -93,18 +93,15 @@ void Liverpool::Process(std::stop_token stoken) {
// Process incoming commands with high priority // Process incoming commands with high priority
while (num_commands) { while (num_commands) {
Common::UniqueFunction<void> callback{}; Common::UniqueFunction<void> callback{};
{ {
std::unique_lock lk{submit_mutex}; std::unique_lock lk{submit_mutex};
callback = std::move(command_queue.back()); callback = std::move(command_queue.front());
command_queue.pop(); command_queue.pop();
}
callback();
--num_commands; --num_commands;
} }
callback();
}
curr_qid = (curr_qid + 1) % num_mapped_queues; curr_qid = (curr_qid + 1) % num_mapped_queues;