comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: open a file non-blocking ?
Date: Tue, 27 Feb 2018 18:32:40 +0100
Date: 2018-02-27T18:32:40+01:00	[thread overview]
Message-ID: <p744nn$nhf$1@gioia.aioe.org> (raw)
In-Reply-To: c275e022-a2ce-4216-8d00-edced7fefaa7@googlegroups.com

On 2018-02-27 18:14, patrick@spellingbeewinnars.org wrote:

> In C I can open with O_NONBLOCK. Is there the same in Ada?

Sure. If your system has open() you can call it from Ada just like you 
would do from C.

> I have different applications but one would be to read from several serial ports. Serial ports are very slow and if opened non-blocking a single task could easily monitor them.
> 
> Tasking is nice but I don't think it is a good idea to use it if there is a simple single threaded solution.

Ah, you actually want "get immediately" for a COM port. That is already 
done. See GNAT.Serial_Communications package which does what you want. 
You can poll ports from one task if you wanted.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2018-02-27 17:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 19:42 open a file non-blocking ? patrick
2018-02-25  7:57 ` Dmitry A. Kazakov
2018-02-25 12:38   ` patrick
2018-02-26  2:53 ` Robert Eachus
2018-02-26  9:33   ` Dmitry A. Kazakov
2018-02-26 16:41   ` Jeffrey R. Carter
2018-02-26 16:55     ` Dmitry A. Kazakov
2018-02-27 17:14       ` patrick
2018-02-27 17:32         ` Dmitry A. Kazakov [this message]
2018-02-27 23:33           ` patrick
2018-02-28  1:13         ` 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