Skip to content

Commit 092247c

Browse files
committed
fix concurency issue
Signed-off-by: Yohann Uguen <[email protected]>
1 parent 4e65366 commit 092247c

File tree

1 file changed

+1
-1
lines changed
  • DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/src

1 file changed

+1
-1
lines changed

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/src/HostStreamer.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class HostStreamer {
261261
// 2) the user has requested us to flush the launch queue and the
262262
// launch queue is not empty (i.e. flush_ && launch_q_.size() != 0)
263263
if ((launch_q_.Size() >= wait_threshold_) ||
264-
(flush_ && !LaunchQueueEmpty())) {
264+
(flush_ && !LaunchQueueEmpty() && ProducerQueueEmpty() && ConsumerQueueEmpty())) {
265265
// grab the oldest request from the launch queue
266266
size_t buf_idx;
267267
size_t count;

0 commit comments

Comments
 (0)