@@ -57,47 +57,3 @@ test(testGettingRunningTaskAlwaysCorrect) {
5757 assertMore (runCount1, 30 );
5858 assertMore (runCount2, 250 );
5959}
60-
61- test (testReentrantLock) {
62- taskManager.reset ();
63-
64- allGood = true ;
65- runCount1 = runCount2 = runCount3 = 0 ;
66-
67- runTaskId1 = taskManager.scheduleFixedRate (10 , [] {
68- if (testLock.tryLock ()) {
69- if (captureCount3 != runCount3 || captureCount2 != runCount2) {
70- allGood = false ;
71- }
72- testLock.unlock ();
73- }
74- else {
75- testLock.lock ();
76- captureCount2 = runCount2;
77- captureCount3 = runCount3;
78- }
79- runCount1++;
80- }, TIME_MILLIS);
81-
82- runTaskId2 = taskManager.scheduleFixedRate (100 , [] {
83- TaskMgrLock locker (testLock);
84- runCount2++;
85- }, TIME_MICROS);
86-
87- taskManager.scheduleFixedRate (50 , [] {
88- TaskMgrLock locker (testLock);
89- runCount3++;
90- }, TIME_MICROS);
91-
92- while (runCount1 < 10 || testLock.isLocked ()) {
93- taskManager.yieldForMicros (100 );
94- }
95-
96- assertTrue (allGood);
97- assertTrue (runTaskId1 != TASKMGR_INVALIDID);
98- assertTrue (runTaskId2 != TASKMGR_INVALIDID);
99- assertMore (runCount1, 9 );
100- assertLess (runCount1, 12 );
101- assertMore (runCount2, 200 );
102- assertMore (runCount3, 200 );
103- }
0 commit comments