comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Tasking and timing out
Date: Thu, 20 Sep 2012 10:53:42 +0200
Date: 2012-09-20T10:53:42+02:00	[thread overview]
Message-ID: <wrv2j41zcurg$.1hkd9jrq134xf$.dlg@40tude.net> (raw)
In-Reply-To: 505ad112$0$295$14726298@news.sunsite.dk

On Thu, 20 Sep 2012 10:17:22 +0200, Thomas L�cke wrote:

> I need to be able to be abandon a socket connection in a task and let
> the task complete if:

ATC is almost never a good idea. I wonder how it worked in your case. Maybe
because the default socket timeout was incidentally close to 2 sec?

In any case you should not expect Ada run-time aborting outstanding OS I/O
requests. In some better world, but not under Windows or Linux.

A proper solution for blocking sockets is to close the socket from an
independent task and catching socket error when it propagates or else to
manipulate the socket timeout before starting any blocking operation.

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



  reply	other threads:[~2012-09-21  1:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20  8:17 Tasking and timing out Thomas Løcke
2012-09-20  8:53 ` Dmitry A. Kazakov [this message]
2012-09-20  9:36   ` Thomas Løcke
2012-09-20 10:21     ` Dmitry A. Kazakov
2012-09-20 20:40       ` Thomas Løcke
2012-09-20 18:33     ` Adam Beneschan
2012-09-20 20:43       ` Thomas Løcke
2012-09-20 21:24       ` sbelmont700
replies disabled

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