From: "Ruben Stranders" <rstranders@yahoo.com>
Subject: Re: Ada multi-threaded programs do not terminate under RedHat Linux
Date: Sun, 9 Nov 2003 00:09:29 +0100
Date: 2003-11-08T23:11:50+00:00 [thread overview]
Message-ID: <bojt7m$59e$1@reader10.wxs.nl> (raw)
In-Reply-To: fhnv71-s24.ln1@beastie.ix.netcom.com
I get the following output:
Start 1
Start 2
Finish 2
Finish 1
(Program doesn't terminate, have to kill it with Ctrl-C)
This indicates that the procedure test is never called.
Ruben
"Dennis Lee Bieber" <wlfraed@ix.netcom.com> wrote in message
news:fhnv71-s24.ln1@beastie.ix.netcom.com...
> Ruben Stranders fed this fish to the penguins on Saturday 08 November
> 2003 01:49 am:
>
>
> > [strand00@atlas rts]$ ./test
> > Start 1
> > Finish 1
> > Start 2
> > Finish 2
> > ===================
> >
> > This is *very* strange....
> >
> One more variation, with a much longer timing loop, and a bit more
> stuff going on inside.
>
> with ada.text_io; use ada.text_io;
>
> procedure test is
> task type counter(ID : integer);
>
> task body counter is
> i : integer := 0;
> begin
> put("Start "); put_line(integer'image(ID));
> while i < 10_000_000 loop
> i := i + 1;
> end loop;
> put("Finish "); put_line(integer'image(ID));
> end;
>
> task1 : counter(1);
> task2 : counter(2);
>
> procedure adummy is
> task3 : counter(3);
> task4 : counter(4);
> begin
> put_line("adummy");
> end;
>
> begin
> put_line("Test");
> adummy;
> put_line("End it");
> end test;
>
> My output looks like:
>
> [wulfraed@beastie ada]$ ./test
> Start 1
> Test
> Start 2
> Start 3
> adummy
> Start 4
> Finish 1
> Finish Finish 2
> 3
> Finish 4
> End it
>
> Notice how 2 and 3 overlapped the I/O (since the "Finish" and the
ID
> are separate calls).
>
> Try something like this one, AND try redirecting the output to a
text
> file. I'm wondering if the RH9 console I/O system might be overwriting
> part of your output -- redirecting, as in
>
> [wulfraed@beastie ada]$ ./test >test.log
>
> would give you a file you can look at with a binary editor. At the very
> least, if you get 3 and 4 output you've shown that the main procedure
> /is/ executing, but then have to figure out why the tasks are getting
> to stdout, but not the main...
>
> --
> > ============================================================== <
> > wlfraed@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> > wulfraed@dm.net | Bestiaria Support Staff <
> > ============================================================== <
> > Bestiaria Home Page: http://www.beastie.dm.net/ <
> > Home Page: http://www.dm.net/~wulfraed/ <
>
next prev parent reply other threads:[~2003-11-08 23:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-07 20:28 Ada multi-threaded programs do not terminate under RedHat Linux Ruben Stranders
2003-11-07 21:45 ` Robert Spooner
2003-11-07 21:53 ` Jeff C,
2003-11-07 22:55 ` news.planet.nl
2003-11-08 2:08 ` Jeffrey Carter
2003-11-10 17:47 ` Warren W. Gay VE3WWG
[not found] ` <h8fu71-s53.ln1@beastie.ix.netcom.com>
2003-11-08 9:49 ` Ruben Stranders
[not found] ` <fhnv71-s24.ln1@beastie.ix.netcom.com>
2003-11-08 23:09 ` Ruben Stranders [this message]
2003-11-09 5:31 ` Adrian Hoe
2003-11-09 10:39 ` Ruben Stranders
2003-11-11 2:32 ` Adrian Hoe
2003-11-11 2:34 ` Adrian Hoe
2003-11-08 21:36 ` Patrice Freydiere
2003-11-10 9:29 ` Gerald Kasner
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox