comp.lang.ada
 help / color / mirror / Atom feed
From: randhol+abuse@pvv.org (Preben Randhol)
Subject: Re: Need advice on Reminder program
Date: Wed, 31 Jan 2001 16:42:01 +0000 (UTC)
Date: 2001-01-31T16:42:01+00:00	[thread overview]
Message-ID: <slrn97gg4p.113.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: 9598bo$c95$1@nnrp1.deja.com

On Wed, 31 Jan 2001 14:44:11 GMT, Ted Dennison wrote:
>In article <slrn97g027.td.randhol+abuse@kiuk0156.chembio.ntnu.no>,
>
>
>  o  By default, Ada tasks die silently when an unhandled exception is
>raised. That can be really rough for debugging. You should probably put
>some kind of last-ditch exception handler at the outermost scope of
>every task to somehow let you know that the task is dying.

Yes I'll do that :-) 

Does this mean that all the tasks will die or does it mean that only the
one task where the exception occurs dies? If the latter is it possible
to have a task that is "overlooking" the others and restart one that has
died?

>  o  Most I/O calls and GUI operations assume that only one task will
>ever make a call on the same object. You should organize things to make
>this so.

Yes I thought I'd use three different tasks. The task doing I/O puts the
appointments in a list and gives this to the task that keeps track of
the time. This task will then pass a text string to the GUI task with
the info to be displayed.

>  o  If you are running on Linux using FSU threads, then I believe any
>non-Ada operation (eg: OS I/O calls, some GUI ops) that blocks the task
>will block the *entire* program. I'd solve this problem by using the
>native threads instead of FSU (unless you need a validated system for
>some reason).

Hmm OK. I don't know what I have, I'll check that.

>  o  A task should generally be designated as either a client (initiates
>rendezvous) or a server (accepts rendezvous). The situations where you
>can get away with doing both in the same task without danger of deadlock
>or undesired extended blocking are rare.

I see. Perhaps I should use a protected object.

>Note that points 1 and 2 together imply that just about any tasking
>program needs some kind of message logging task to handle the sending of
>error messages to the user.

Noted.

Thanks for the help.

-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
iMy favorite editor is Emacs!<ESC>bcwVim<ESC>
                                         -- vim best-editor.txt



  reply	other threads:[~2001-01-31 16:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-31 12:07 Need advice on Reminder program Preben Randhol
2001-01-31 14:44 ` Ted Dennison
2001-01-31 16:42   ` Preben Randhol [this message]
2001-01-31 19:08     ` Ted Dennison
2001-02-02  0:04       ` Client-Server 'Gender' [was Need advice on ...] Nick Roberts
2001-02-02 14:38         ` Ted Dennison
2001-01-31 14:47 ` Need advice on Reminder program sk
2001-01-31 16:04   ` Preben Randhol
2001-02-01 11:47     ` Tarjei T. Jensen
2001-02-01 12:29       ` Preben Randhol
2001-02-01 15:18         ` Tarjei T. Jensen
2001-02-01 16:21           ` Preben Randhol
2001-02-01 18:37             ` sknipe
2001-02-01 21:10       ` Matthew Woodcraft
2001-02-02  1:16         ` Preben Randhol
2001-02-02 17:14       ` (null)
2001-01-31 18:08 ` Stephen Leake
2001-01-31 18:46   ` Preben Randhol
replies disabled

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