From 90a53fa39ddcd0a64f569340d745a5fc790f269b Mon Sep 17 00:00:00 2001 From: Yohann Uguen Date: Wed, 22 Feb 2023 09:12:09 -0800 Subject: [PATCH] fix concurency issue Signed-off-by: Yohann Uguen --- .../DesignPatterns/buffered_host_streaming/src/HostStreamer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/src/HostStreamer.hpp b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/src/HostStreamer.hpp index 2a3b494e60..6885f7d4b1 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/src/HostStreamer.hpp +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/src/HostStreamer.hpp @@ -261,7 +261,7 @@ class HostStreamer { // 2) the user has requested us to flush the launch queue and the // launch queue is not empty (i.e. flush_ && launch_q_.size() != 0) if ((launch_q_.Size() >= wait_threshold_) || - (flush_ && !LaunchQueueEmpty())) { + (flush_ && !LaunchQueueEmpty() && ProducerQueueEmpty() && ConsumerQueueEmpty())) { // grab the oldest request from the launch queue size_t buf_idx; size_t count;