comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
To: mhamel_98@yahoo.com
Subject: Re: Interrupting Get_Line
Date: Thu, 31 May 2007 20:27:12 +0200
Date: 2007-05-31T20:27:21+02:00	[thread overview]
Message-ID: <465F1380.8010003@obry.net> (raw)
In-Reply-To: <1180634286.341390.214020@m36g2000hse.googlegroups.com>

mhamel_98@yahoo.com a �crit :
> I have a program with a task that reads off the command line via
> get_line.  Now some other parts/tasks of the program occasionally need
> to read off the line as well, usually a (y/n) type question to the
> user that I use get_immediate for.  Thing is, the get_line in the cli
> task 'intercepts' the response to the get_immediate. 

I think you have to redesign this stuff. There is a single standard
input and this resource can't be shared by multiple threads. There is no
way to change this fact, it can't be shared and you need to work around
that.

> Another workable solution would be to pop up a new console as needed
> that goes away as soon as it gets a response, how would I do this?

This is OS dependent, it is not related to Ada.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



  reply	other threads:[~2007-05-31 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 17:58 Interrupting Get_Line mhamel_98
2007-05-31 18:27 ` Pascal Obry [this message]
2007-06-01 16:09   ` Adam Beneschan
replies disabled

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