Timeline: Fix assertion triggered by failure to join a diskthread which self-terminated due to punch-out.

pull/186/head
Jonathan Moore Liles 2015-02-15 15:47:55 -08:00
parent ab88b2d3ec
commit 60059f4005
4 changed files with 13 additions and 19 deletions

View File

@ -88,7 +88,11 @@ Thread::run_thread ( void *arg )
((Thread*)td.t)->_running = true;
return td.entry_point( td.arg );
void * r = td.entry_point( td.arg );
((Thread*)td.t)->_running = false;
return r;
}

View File

@ -137,9 +137,14 @@ Disk_Stream::shutdown ( void )
block_processed();
usleep( 10 * 1000 );
}
_thread.join();
}
/* thread may have terminated on it's own (due to punch out..), in
* any case join to clean up */
_thread.join();
DMESSAGE( "diskthread joined." );
}
Track *

View File

@ -181,8 +181,6 @@ done:
// flush();
_terminate = false;
_thread.exit();
}
/** take a single block from the ringbuffers and send it out the

View File

@ -247,8 +247,6 @@ again:
_recording = false;
DMESSAGE( "capture thread gone" );
_thread.exit();
}
@ -283,20 +281,9 @@ Record_DS::stop ( nframes_t frame )
{
THREAD_ASSERT( UI );
if ( ! _recording )
{
WARNING( "programming error: attempt to stop recording when no recording is being made" );
return;
}
_stop_frame = frame;
// _recording = false;
// detach();
DMESSAGE( "recording finished" );
DMESSAGE( "recording stop scheduled" );
}