comp.lang.ada
 help / color / mirror / Atom feed
From: Stribor40 <ikamzic@gmail.com>
Subject: tasks in queue
Date: Thu, 9 Oct 2014 04:57:57 -0700 (PDT)
Date: 2014-10-09T04:57:57-07:00	[thread overview]
Message-ID: <a1a1c181-ff96-4453-933e-17a4837f0ac3@googlegroups.com> (raw)

In this tutorial http://www.infres.enst.fr/~pautet/Ada95/e_c27_p3.ada

it basically say that tasks are served by FIFO 

"Considering all that we have said so far about tasking, you should understand that all three of these tasks begin execution at the same time and Bill and John both request a hot dog immediately. Since there is only one entry point, only one can be served at a time, and the Ada definition does not specify which will be serviced first. It does specify that both will ultimately be served, so there is an implicit queue at the entry point where requests can be stored until they can be serviced in turn. All requests are serviced on a First In First Out (FIFO) basis with no concern for priority of tasks (to be defined later). This queue is a "hidden" queue as far as you, the programmer, are concerned because you have no access to it. You cannot therefore, sort through the entries and redefine the order of execution of the various entry requests. The attribute named COUNT is available which will return the number of requests pending on any entry queue. Its use will be illustrated in the program named e_c29_p6.ada in chapter 29 of this tutorial."

But this explanation says also "the Ada definition does not specify which will be serviced first".

also if in the main you have something like....

calling .....First_Task
calling..... Second_Task
calling......Third_Task

since this is sequentially executed doesn't that guarantee First_Task will run first?

             reply	other threads:[~2014-10-09 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 11:57 Stribor40 [this message]
2014-10-09 12:14 ` tasks in queue Björn Lundin
replies disabled

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