kuwze
kuwze

Reputation: 421

Do Ada 2012 implementations from AdaCore/FSF support spawning tasks arbitrarily?

TLDR: I am an idiot. It turns out that the library is for interfacing with OS spawned processes, not native Ada tasks.

I recently stumbled across this library for spawning tasks arbitrarily and I was wondering if the feature that it implements for System.OS_Lib is now a part of the default implementation of Ada 2012 from AdaCore/FSF.

I am unsure if Ada tasking in 2012 is concurrent or parallel, so I have tagged both in this post.

Upvotes: 1

Views: 89

Answers (1)

Jacob Sparre Andersen
Jacob Sparre Andersen

Reputation: 6611

Ada has at least since 1995 allowed spawning of tasks anywhere you like it in your application. There are two/three ways of doing it:

In a declarative region:

Some_Task  : Some_Task_Type;
Other_Task : Soma_Task_Access := new Some_Task_Type;

In a statement:

Other_Task := new Some_Task_Type;

Upvotes: 2

Related Questions