From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: Tasking issues
Date: Sun, 12 Aug 2007 22:07:41 GMT
Date: 2007-08-12T22:07:41+00:00 [thread overview]
Message-ID: <NwLvi.42920$Xa3.37277@attbi_s22> (raw)
In-Reply-To: <L_zvi.420569$p47.372414@bgtnsc04-news.ops.worldnet.att.net>
anon wrote:
>
> continue : boolean := True ; -- task to continue running
There's no guarantee that operations on this variable are atomic. You
can get into pragma Atomic, bu in general, unprotected variables are not
a good way for tasks to communicate.
> if Name ( 1 .. 4 ) = "stop" then
> continue := false ;
> end if ;
What happens after the following sequence of inputs:
"atopofoldSmokey"
"s"
?
> -- do nothing!
>
> while continue loop
> delay 0.0 ;
> end loop ;
>
> -- abort tasks. But because get_name may be in the process of
> -- obtaining data from standard_input. it may require a CR/LF
> -- to be entered to fully abort the 'get_name' task.
>
> abort get_name ;
> Put_Line ( "EOT -- get_name" ) ;
> abort print_something ;
> Put_Line ( "EOT -- print_something" ) ;
> Put_Line ( "EOJ" ) ;
This does quite a bit. Have the tasks check for the termination
condition themselves, and the main procedure's SOS can be "null;"
--
Jeff Carter
"Sir Lancelot saves Sir Gallahad from almost certain temptation."
Monty Python & the Holy Grail
69
prev parent reply other threads:[~2007-08-12 22:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 17:03 Tasking issues shaunpatterson
2007-08-11 18:42 ` Dmitry A. Kazakov
2007-08-12 11:06 ` Simon Wright
2007-08-12 12:05 ` Dmitry A. Kazakov
2007-08-12 17:12 ` shaunpatterson
2007-08-12 18:03 ` Dmitry A. Kazakov
2007-08-12 22:10 ` Jeffrey R. Carter
2007-08-13 19:54 ` Simon Wright
2007-08-13 22:30 ` shaunpatterson
2007-08-14 7:10 ` Tasking issues => Book List anon
[not found] ` <13bulskfjvogv8e@corp.supernews.com>
2007-08-12 20:20 ` Tasking issues Simon Wright
2007-08-11 18:51 ` jimmaureenrogers
2007-08-11 19:08 ` Jeffrey R. Carter
2007-08-11 22:31 ` Steve
2007-08-12 9:00 ` anon
2007-08-12 9:43 ` Dmitry A. Kazakov
2007-08-12 21:39 ` anon
2007-08-12 22:15 ` Jeffrey R. Carter
2007-08-13 9:13 ` anon
2007-08-13 19:37 ` Simon Wright
2007-08-13 20:17 ` Markus E.L. 2
2007-08-14 0:40 ` Jeffrey R. Carter
2007-08-13 9:22 ` Dmitry A. Kazakov
2007-08-13 12:41 ` Larry Kilgallen
2007-08-13 13:22 ` Dmitry A. Kazakov
2007-08-12 21:03 ` Maciej Sobczak
2007-08-12 22:07 ` 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