Why it is not sure for below code that task_1 should execute first then task_2 because task_1 which is in waiting state get first start message from main? but output is not predictable please help me to understand?
WITH Ada.Text_IO; -- Include Text_IO Library
WITH Ada.Integer_Text_IO; -- Include Integer Text_IO Library
PROCEDURE task_demo_02 IS
TASK TYPE intro_task (message1 : Integer) IS
ENTRY start; -- Entry Point Into The Task
END intro_task;
TASK BODY intro_task IS -- Task Body Definition
BEGIN
ada.text_io.put_line("waitng");
ACCEPT start; -- Entry Point Into The Task
Ada.Text_IO.put ( "Display from Task ");
Ada.Integer_Text_IO.put (message1, 1);
Ada.Text_IO.new_line;
END intro_task;
Task_1 : intro_task (message1 => 1);--activate
Task_2 : intro_task (message1 => 2);--activate
BEGIN
ada.Text_IO.put_line("main");
Task_1.start; --- first task_1 should execute
Task_2.start; --- then task_2 isn't it ?
END task_demo_02;