Skip to content

Commit e5ec1cc

Browse files
CB: fix deadlock (openvinotoolkit#948)
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
1 parent 82d6697 commit e5ec1cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpp/src/continuous_batching_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ ContinuousBatchingPipeline::ContinuousBatchingImpl::generate(const std::vector<o
258258
bool continue_generation = true;
259259
while (has_non_finished_requests() && continue_generation) {
260260
step();
261-
if (streamer_ptr) {
261+
if (streamer_ptr && generations.at(0)->can_read()) {
262262
std::unordered_map<uint64_t, GenerationOutput> token = generations.at(0).get()->back();
263263
OPENVINO_ASSERT(1 == token.size());
264264
OPENVINO_ASSERT(1 == token.begin()->second.generated_ids.size());

0 commit comments

Comments
 (0)