comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Performance of many concurrent delay() calls
Date: Wed, 9 Nov 2016 16:15:13 -0700
Date: 2016-11-09T16:15:13-07:00	[thread overview]
Message-ID: <o00al7$msn$1@dont-email.me> (raw)
In-Reply-To: <9e35ad48-8af5-4abc-aa67-70b9edd3ab24@googlegroups.com>

On 11/09/2016 08:50 AM, Olivier Henley wrote:
>
> Right now I am doing the following inside the On_Connect handler
>
> loop
>   if Main_Window.Connection_Data = null then
>     exit;
>   end if;

exit when Main_Window.Connection_Data = null;

>   App_Central.Process_Message (App_Data);
>
>   delay 1.0;
> end loop;
>
> Is it fine or the usage of a task is strongly recommended and for what reasons?

I don't know. IIUC, Gnoga creates a task to call the on-connect handler, and 
you're keeping that task busy in the handler for the life of the connection. I 
don't know what the effect of that on the Gnoga internals might be. If it works 
OK for lots of connections, then it's probably OK. Botton would know for sure. 
Personally, I'd rather not tie up a task from a library without knowing more 
about what the consequences are.

-- 
Jeff Carter
"I've seen projects fail miserably for blindly
applying the Agile catechism: we're Agile, we
don't need to stop and think, we just go ahead
and code!"
Bertrand Meyer
150

      reply	other threads:[~2016-11-09 23:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 18:52 Performance of many concurrent delay() calls Olivier Henley
2016-11-07 19:04 ` J-P. Rosen
2016-11-07 19:13 ` Olivier Henley
2016-11-07 20:57 ` Dmitry A. Kazakov
2016-11-07 21:30 ` Florian Weimer
2016-11-07 22:42 ` Jeffrey R. Carter
2016-11-09 15:50 ` Olivier Henley
2016-11-09 23:15   ` Jeffrey R. Carter [this message]
replies disabled

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