From: Gilbert Gosseyn <hnptz@yahoo.de>
Subject: Task_Barriers
Date: Thu, 25 Jul 2019 09:32:15 -0700 (PDT)
Date: 2019-07-25T09:32:15-07:00 [thread overview]
Message-ID: <e0ed983d-bb8d-4568-8f0b-c6771431e271@googlegroups.com> (raw)
with Ada.Text_IO , Ada.Synchronous_Barriers ;
use Ada.Text_IO , Ada.Synchronous_Barriers ;
procedure Task_Barriers is
NT: constant := 2;
SB: Ada.Synchronous_Barriers.Synchronous_Barrier(NT) ;
Notified : Boolean:= False ;
task T1 ;
task T2 ;
X: Integer :=0;
Y: Integer :=1;
task body T1 is
begin
loop
delay 1.0 ;
Wait_For_Release (SB,Notified) ;
X:=X+1;
end loop ;
end T1 ;
task body T2 is
begin
loop
delay 1.0 ;
Wait_For_Release (SB, Notified) ;
Y:=Y+1;
end loop ;
end T2 ;
begin
null ;
end Task_Barriers ;
This program runs forever, although it should stop when reaching an internal count number?
next reply other threads:[~2019-07-25 16:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 16:32 Gilbert Gosseyn [this message]
2019-07-25 16:43 ` Task_Barriers Dmitry A. Kazakov
2019-07-25 18:56 ` Task_Barriers Dennis Lee Bieber
2019-07-25 20:11 ` Task_Barriers Jeffrey R. Carter
2019-07-25 20:17 ` Task_Barriers Simon Wright
2019-07-25 21:59 ` Task_Barriers Randy Brukardt
2019-07-26 7:52 ` Task_Barriers Simon Wright
2019-07-26 23:59 ` Task_Barriers Dennis Lee Bieber
2019-07-26 10:38 ` Task_Barriers Gilbert Gosseyn
2019-07-26 11:09 ` Task_Barriers Dmitry A. Kazakov
2019-07-26 15:03 ` Task_Barriers Simon Wright
2019-07-27 0:10 ` Task_Barriers Dennis Lee Bieber
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox