From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: How to terminate all running tasks?
Date: Wed, 10 Jun 2020 15:49:17 +0200
Date: 2020-06-10T15:49:17+02:00 [thread overview]
Message-ID: <rbqoct$p0r$1@dont-email.me> (raw)
In-Reply-To: <7c14755d-f5f0-4000-bde1-d34423cf43abo@googlegroups.com>
On 6/10/20 1:14 PM, Gilbert Gosseyn wrote:
> package packp6 is
> procedure tp6pm(N : Long_Integer);
> end packp6;
>
> with Ada.Text_IO; use Ada.Text_IO;
> package body packp6 is
> procedure tp6pm(N : Long_Integer) is
> package LIO is new Integer_IO(Long_Integer);
Solution_Found : Boolean := False;
pragma Atomic (Solution_Found);
>
> task p6p;
>
> task body p6p is
> pp,i : Long_Integer := 0;
> begin
> loop
exit when Solution_Found;
> i := i+1;
> pp := 6*i+1;
> if N mod pp = 0 then
> new_line;put("pp= ");LIO.put(pp);
Solution_Found := True;
> end if;
> end loop;
> end p6p;
> begin
> loop
exit when Solution_Found;
> i := i+1;
> pm := 6*i-1;
> if N mod pm = 0 then
> new_line;put("pm= ");LIO.put(pm);
Solution_Found := True;
> end if;
> end loop;
> end tp6pm;
> end packp6;
--
Jeff Carter
"Unix and C are the ultimate computer viruses."
Richard Gabriel
99
next prev parent reply other threads:[~2020-06-10 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 11:14 How to terminate all running tasks? Gilbert Gosseyn
2020-06-10 12:12 ` Niklas Holsti
2020-06-10 12:29 ` Niklas Holsti
2020-06-10 16:26 ` Simon Wright
2020-06-11 6:04 ` J-P. Rosen
2020-06-10 13:49 ` Jeffrey R. Carter [this message]
2020-06-10 14:45 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox