Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,10 @@
with Ada.Task_Identification; use Ada.Task_Identification;
procedure Main is
-- Create as many task objects as your program needs
begin
-- whatever logic is required in your Main procedure
if some_condition then
Abort_Task (Current_Task);
end if;
end Main;

View file

@ -0,0 +1,11 @@
procedure Main is
-- Create as many task objects as your program needs
begin
-- whatever logic is required in your Main procedure
if some_condition then
-- for each task created by the Main procedure
The_task.Stop;
-- end the Main procedure
return; -- actually, this is not needed
end if;
end Main;

View file

@ -0,0 +1,14 @@
task body Some_Task is
begin
loop
select
-- Some alternatives
...
or accept Stop do
-- Some cleanup while holding the caller is here
end Stop;
-- A cleanup asynchronous to the caller is here
exit; -- We are through
end select
end loop;
end Some_Task;

View file

@ -0,0 +1,10 @@
task body Some_Task is
begin
loop
select
-- Some alternatives
...
or terminate; -- We are through
end select
end loop;
end Some_Task;