cwIo.cpp : stop() now calls stop the thread machine.

This commit is contained in:
kevin 2022-12-27 18:10:26 -05:00
parent cbaff98964
commit c693eab091

View File

@ -195,6 +195,7 @@ namespace cw
// make the callback to the client // make the callback to the client
if( rc == kOkRC ) if( rc == kOkRC )
{ {
rc_t app_rc = p->cbFunc( p->cbArg, m ); rc_t app_rc = p->cbFunc( p->cbArg, m );
if( app_rc_ref != nullptr ) if( app_rc_ref != nullptr )
*app_rc_ref = app_rc; *app_rc_ref = app_rc;
@ -1982,12 +1983,14 @@ cw::rc_t cw::io::stop( handle_t h )
io_t* p = _handleToPtr(h); io_t* p = _handleToPtr(h);
p->quitFl.store(true); p->quitFl.store(true);
thread_mach::stop(p->threadMachH );
// stop the audio devices // stop the audio devices
_audioDeviceStartStop(p,false); _audioDeviceStartStop(p,false);
// clear the UI // clear the UI
if( p->wsUiH.isValid() ) //if( p->wsUiH.isValid() )
uiDestroyElement(h,ui::kRootUuId); // uiDestroyElement(h,ui::kRootUuId);
return kOkRC; return kOkRC;
} }