File tree Expand file tree Collapse file tree 1 file changed +5
-25
lines changed
src/ObservableComputations.Test Expand file tree Collapse file tree 1 file changed +5
-25
lines changed Original file line number Diff line number Diff line change @@ -442,43 +442,28 @@ public void DisposeTest()
442442 ManualResetEventSlim mre = new ManualResetEventSlim ( false ) ;
443443 bool invoked1 = false ;
444444 bool invoked2 = false ;
445- bool freezed = false ;
446445 InvocationResult < bool > invocationResult1 = null ;
447446 InvocationResult < bool > invocationResult2 = null ;
448447
449448 dispatcher . InvokeAsync ( ( ) =>
450449 {
451450 dispatcher . InvokeAsync ( ( ) =>
452451 {
453- freezed = true ;
454452 mre . Wait ( ) ;
455453 } ) ;
456454
457-
458- invocationResult1 = dispatcher . Invoke ( ( ) =>
459- {
460- mre . Wait ( ) ;
461- invoked1 = true ;
462- return true ;
463- } ) ;
455+ mre . Wait ( ) ;
456+ invocationResult1 = dispatcher . Invoke ( ( ) => invoked1 = true ) ;
464457
465458 } ) ;
466459
467460 Thread thread = new Thread (
468461 ( ) =>
469462 {
470- while ( ! freezed )
471- {
472-
473- }
474-
475- invocationResult2 = dispatcher . Invoke ( ( ) =>
476- {
477- mre . Wait ( ) ;
478- invoked2 = true ;
479- return true ;
480- } ) ;
463+ mre . Wait ( ) ;
464+ invocationResult2 = dispatcher . Invoke ( ( ) => invoked2 = true ) ;
481465 } ) ;
466+
482467 thread . Start ( ) ;
483468
484469 ManualResetEventSlim mreDisposed = new ManualResetEventSlim ( false ) ;
@@ -489,11 +474,6 @@ public void DisposeTest()
489474 mreDisposed . Set ( ) ;
490475 } ;
491476
492- while ( dispatcher . GetQueueCount ( ) != 2 )
493- {
494-
495- }
496-
497477 dispatcher . Dispose ( ) ;
498478 mre . Set ( ) ;
499479 thread . Join ( ) ;
You can’t perform that action at this time.
0 commit comments