Skip to content

Commit 8a163ca

Browse files
author
sakirr
committed
fix: make decode_failed_ std::atomic for thread safety (review)
1 parent 2473e1b commit 8a163ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/runanywhere-commons/src/backends/llamacpp/llamacpp_backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class LlamaCppTextGeneration {
134134

135135
bool model_loaded_ = false;
136136
std::atomic<bool> cancel_requested_{false};
137-
bool decode_failed_ = false;
137+
std::atomic<bool> decode_failed_{false};
138138

139139
std::string model_path_;
140140
nlohmann::json model_config_;

0 commit comments

Comments
 (0)