diff options
author | sb <sb@openoffice.org> | 2010-04-27 10:31:33 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-04-27 10:31:33 +0200 |
commit | b40f5c4e55e4bd95b6da80a42c99f6cfeb977a26 (patch) | |
tree | 4802b915ea449e6eac66c26a8e77378b5a73b7b1 /sal | |
parent | f0f6d94a7916a07da1ffbfd2e931a42dd5f91fcb (diff) |
sb120: removed race from sal/qa/osl/mutex test code
Diffstat (limited to 'sal')
-rwxr-xr-x | sal/qa/osl/mutex/osl_Mutex.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx index df0d2fe8ef6b..4b1b078785d3 100755 --- a/sal/qa/osl/mutex/osl_Mutex.cxx +++ b/sal/qa/osl/mutex/osl_Mutex.cxx @@ -838,7 +838,7 @@ protected: void SAL_CALL run( ) { // acquire the mutex - printf("# ResettableGuard" ); + printf("# ResettableGuard\n" ); ResettableMutexGuard aGuard( pMyMutex ); // release the mutex aGuard.clear( ); @@ -894,13 +894,13 @@ namespace osl_ResettableGuard { Mutex aMutex; ResetGuardThread myThread( &aMutex ); - myThread.create( ); ResettableMutexGuard myMutexGuard( aMutex ); + myThread.create( ); /// is it running? and clear done? + sal_Bool bRes = myThread.isRunning( ); myMutexGuard.clear( ); ThreadHelper::thread_sleep_tenth_sec( 1 ); - sal_Bool bRes = myThread.isRunning( ); /// if reset is not success, the release will return sal_False myMutexGuard.reset( ); |