Commit 14552914 authored by Mitch Burnett's avatar Mitch Burnett
Browse files

Prevent save thread from hanging on a quit

Without the condition to check if the thread should be running (e.g., the call
to run_threads()) the save thread hangs waiting for blocks to be filled and does
not register the signal interrupt correctly.
parent 567ed673
......@@ -49,7 +49,7 @@ static void * run(hashpipe_thread_args_t * args) {
while (run_threads()) {
// Wait for input buffer block to be filled
while ((rv=flag_gpu_beamformer_output_databuf_wait_filled(db_in, curblock_in)) != HASHPIPE_OK) {
while ((rv=flag_gpu_beamformer_output_databuf_wait_filled(db_in, curblock_in)) != HASHPIPE_OK && run_threads()) {
if (rv==HASHPIPE_TIMEOUT) {
hashpipe_status_lock_safe(&st);
hputs(st.buf, status_key, "waiting for free block");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment