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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a6c65cbc407987fe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-14 14:03:32 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer.radix.net!uunet!ash.uu.net!world!news From: Robert A Duff Subject: Re: dynamic multithreading User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Thu, 14 Nov 2002 22:03:10 GMT Content-Type: text/plain; charset=us-ascii References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:30908 Date: 2002-11-14T22:03:10+00:00 List-Id: "Artiom Ivanov" writes: > As you know in many applications when using threads, we sometimes need to > create a "tasks" dynamically (I mean at run-time). You create tasks in Ada just like you create variables of any other type. If you have a task type: task type T; task body T is begin ... end T; then you can create local tasks: X: T; or you can create them in the heap: type T_Ptr is access T; X: T_Ptr := new T; You can also have record components of type T, and create local records, or records in the heap. - Bob