167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
|
procedure Delete_While_Busy (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Delete entry while callback is running");
Total : constant Duration := 0.01;
Log : aliased Bounded_String (256);
begin
declare
Test_Entry : Cron_Entry;
Guard_Entry : Cron_Entry;
begin
Test_Entry.Set (Total / 8, Long_Callback'
(Backend => Log'Access,
Open => '(',
Close => ')',
Wait => Total / 4));
Guard_Entry.Set (Total / 2, Test_Callback'
(Backend => Log'Access,
Symbol => '.'));
delay Total / 4;
end;
Check (Test, "(", Get (Log), "Before wait");
delay Total / 2;
Check (Test, "()", Get (Log), "After wait");
Check (Test, "(", Get (Log), "Before wait");
Test_Entry.Reset;
delay Total / 2;
Check (Test, "().", Get (Log), "After wait");
end;
exception
when Error : others => Test.Report_Exception (Error);
end Delete_While_Busy;
procedure Delete_While_Collision (Report : in out NT.Reporter'Class) is
Test : NT.Test
|