-- task_test.adb -- -- Trivial Tasking example to demonstrate that the tasking is working. -- This program should be linked with the Multi-Threaded version -- of the LIBC (LIBCMT.LIB) -- -- Takes no arguments... prints a sequence of characters. -- -- Should run about 4.5 seconds, with roughly 400ms startup time. -- with Text_IO; use Text_IO; procedure Task_Test is task x is entry start; end x; task body x is begin for I in 1..3 loop delay 0.2; Text_IO.Put('x'); end loop; accept start; for I in 1..3 loop delay 0.3; Text_IO.Put('y'); end loop; end x; begin for J in 1..2 loop delay 1.0; Text_IO.Put('T'); end loop; X.Start; for J in 1..5 loop delay 0.5; Text_IO.Put('Z'); end loop; New_Line; Put_Line("xxxTTyZyyZZZZ is the Expected Output"); end Task_Test;