Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
check running
Browse files Browse the repository at this point in the history
  • Loading branch information
DDEle authored and zhentaoyu committed Jan 23, 2024
1 parent 06171ab commit eb639e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions neural_speed/application/main_pybind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ class ModelServer {
};

int issueQuery(std::vector<Query>& qs) {
if (!running) throw std::runtime_error("Server stopped!");
std::lock_guard<std::mutex> lock(queue_mtx);
std::copy(qs.cbegin(), qs.cend(), std::back_inserter(waiting));
return waiting.size();
Expand Down

0 comments on commit eb639e4

Please sign in to comment.