comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Concurrency in Ada
Date: Sun, 07 Sep 2014 11:06:44 -0700
Date: 2014-09-07T11:06:44-07:00	[thread overview]
Message-ID: <lui6rk$tkc$2@dont-email.me> (raw)
In-Reply-To: <4d9466ad-5c9e-4b1f-8797-def623b3beb6@googlegroups.com>

On 09/07/2014 05:29 AM, Stribor40 wrote:
> I have this program from online tutorial that says that tasks will run as
> soon as program starts. My question is when does this program starts on what
> line if code

I'm not sure what you're asking. In Ada the declarations (before "begin") are
elaborated at run time, followed by execution of the statements after "begin".
Task objects such as in the example begin executing when elaboration/execution
reaches "begin".

> Do tasks run all at same tine or they are scheduled by OS which would mean
> anytime you run this program output would be different?

Conceptually, tasks run at the same time. What actually happens depends on the
OS (if any) and number of processors available. In general, the externally
observable effects of multiple tasks will differ from run to run unless the
program takes steps to ensure otherwise. See a recent thread here on c.l.a on
interleaved output from tasks.

-- 
Jeff Carter
"It's symbolic of his struggle against reality."
Monty Python's Life of Brian
78


  parent reply	other threads:[~2014-09-07 18:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 12:29 Concurrency in Ada Stribor40
2014-09-07 15:05 ` Dennis Lee Bieber
2014-09-07 18:06 ` Jeffrey Carter [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-12-03  0:00 Javier Crespo
1996-12-03  0:00 ` Greg Bond
1996-12-03  0:00 ` Michael Feldman
1996-12-18  0:00 ` elaine.waybright
replies disabled

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