延迟语句是否将进程置于阻塞状态?

Does the Delay Statement Place the Process in a Blocked State?

如果我们在 Ada 中有两个任务,并且如果我有延迟语句,无论是“延迟 0.0”还是“延迟 1.0”,是否会使该进程进入阻塞状态?还是过程状态不适用于此处?下面是一个简单的代码来说明我的问题:

with Ada.Text_IO; use Ada.Text_IO;

procedure Two_Tasks is

     task Task_1;
     task Task_2;

     task body Task_1 is
     begin
      for I in 1 .. 10 loop
         Put_Line ("Visited task 1, iteration number" & Integer'Image (I));
         delay 0.0;
      end loop;
     end Task_1;
  
     task body Task_2 is
     begin
      for I in 1 .. 10 loop
         Put_Line ("Visited task 2, iteration number" & Integer'Image (I));
      end loop;
     end Task_2;

begin
   Put_Line ("Visited the main task");
end Two_Tasks;

在进程状态方面,我说的是这张图中显示的 process/thread 状态:

根据 Ada 2012 参考手册部分 9.6

For the execution of a delay_statement, the delay_expression is first evaluated. For a delay_until_statement, the expiration time for the delay is the value of the delay_expression, in the time base associated with the type of the expression. For a delay_relative_statement, the expiration time is defined as the current time, in the time base associated with relative delays, plus the value of the delay_expression converted to the type Duration, and then rounded up to the next clock tick. The time base associated with relative delays is as defined in D.9, “Delay Accuracy” or is implementation defined.

The task executing a delay_statement is blocked until the expiration time is reached, at which point it becomes ready again. If the expiration time has already passed, the task is not blocked.