This PR addresses a few remaining known issues observed in the tests when run repeatedly.
In particular, there were some timing issues with setting the thread priority that could cause the expected thread priority to be lost if set at just the wrong time.
Another issue, that was introduced in #1033, was causing calls to CoreContext::SignalShutdown to potentially wait for a CoreThread to shutdown, even if the wait flag was not set. The solution was to only wait to Rundown (called from the CoreThread's thread) only after the CoreThread::OnStop function is called if we are in the midst of a shutdown.
Finally, some tests were modified to clean up after themselves. Many times there were no waiting on the contexts, causing them to interfere with the next test.
This PR addresses a few remaining known issues observed in the tests when run repeatedly.
In particular, there were some timing issues with setting the thread priority that could cause the expected thread priority to be lost if set at just the wrong time.
Another issue, that was introduced in #1033, was causing calls to
CoreContext::SignalShutdown
to potentially wait for aCoreThread
to shutdown, even if the wait flag was not set. The solution was to only wait toRundown
(called from theCoreThread
's thread) only after theCoreThread::OnStop
function is called if we are in the midst of a shutdown.Finally, some tests were modified to clean up after themselves. Many times there were no waiting on the contexts, causing them to interfere with the next test.