comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: Tasking question (not the same as ^^^)
Date: 1997/10/10
Date: 1997-10-10T00:00:00+00:00	[thread overview]
Message-ID: <343E40D8.1901@gsfc.nasa.gov> (raw)
In-Reply-To: 61kipb$p28$1@reader1.reader.news.ozemail.net


Paul Van Gorp wrote:
> 
> begin
> 
> ...
>         loop
>                 ch := Getch;
>                 user.input_entered(ch);
>         end loop
> ...
> end ...;
> 
> Now, It may be a rotten way to do it, but it works fine when there is > no
> facility for a simple keyboard interface, the tasks all seem to not > operate
> when input is being awaited from the keyboard.
> 
> It seems to work fine when I hardcode input ( user.input_entered(...) > ) in the
> main part of the program.

Getch is not a standard Ada function, so I don't know what it really
does. It appears to halt the entire process, including all tasks, while
waiting for input. This is typical of many Ada implementations; it
depends on the operating system, and how the Ada runtime maps tasks to
operating system processes or threads. There may be a compiler switch to
influence this mapping. 

Another possible solution is to use Text_IO.Get_Immediate; on some
systems, this does not block all tasks.

Always give info on your compiler and OS in help requests. It doesn't
cost you much, and you are much more likely to get a good answer!

> 
> Thanks in advance..

You're welcome.
> 
> Paul

-- 
- Stephe




  parent reply	other threads:[~1997-10-10  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-10  0:00 Tasking question (not the same as ^^^) Paul Van Gorp
1997-10-10  0:00 ` Matthew Heaney
1997-10-10  0:00   ` Robert Dewar
1997-10-10  0:00 ` Stephen Leake [this message]
1997-10-11  0:00   ` Paul Van Gorp
1997-10-30  0:00 ` Balmacara9
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox