From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.70.38.3 with SMTP id c3mr5154289pdk.7.1410092974958; Sun, 07 Sep 2014 05:29:34 -0700 (PDT) X-Received: by 10.182.63.104 with SMTP id f8mr287obs.35.1410092974677; Sun, 07 Sep 2014 05:29:34 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!r2no16159045igi.0!news-out.google.com!ht4ni0igb.0!nntp.google.com!r2no16159039igi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 7 Sep 2014 05:29:34 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.36.114.177; posting-account=Lb5doAoAAAAWHET3z2_nBVbFSXaZQG1V NNTP-Posting-Host: 24.36.114.177 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4d9466ad-5c9e-4b1f-8797-def623b3beb6@googlegroups.com> Subject: Concurrency in Ada From: Stribor40 Injection-Date: Sun, 07 Sep 2014 12:29:34 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.dca.giganews.com comp.lang.ada:188904 Date: 2014-09-07T05:29:34-07:00 List-Id: 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 WITH Ada.Text_IO; -- Include Text_IO Library WITH Ada.Integer_Text_IO; -- Include Integer Text_IO Library PROCEDURE task_demo_01 IS -- Task Type Specification TASK TYPE intro_task (message : Integer); TASK BODY intro_task IS -- Task Body Definition BEGIN FOR count IN 1..5 LOOP Ada.Text_IO.put (Item => "Display from Task "); Ada.Integer_Text_IO.put (Item => message, Width => 1); Ada.Text_IO.new_line; END LOOP; END intro_task; -- Unlike procedures, these tasks are not called. -- These three tasks are activated once the program begins. Task_1 : intro_task (message => 1); Task_2 : intro_task (message => 2); Task_3 : intro_task (message => 3); BEGIN NULL; END task_demo_01; 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?