Comment by pjmlp
5 years ago
You can do a round over here,
https://freepages.modula2.org/compi.html
As for Ada tasks, https://learn.adacore.com/courses/intro-to-ada/chapters/task...
5 years ago
You can do a round over here,
https://freepages.modula2.org/compi.html
As for Ada tasks, https://learn.adacore.com/courses/intro-to-ada/chapters/task...
As someone who doesn't know Ada very well: Ada 'tasks' look like ordinary threads but with integrated message pumps. Is that about right?
There's a bit more to it.
I think one of the more novel (hah! 40 years old now) aspects is that tasks can be declared on the stack which allows for structured concurrency to be done in Ada without needing a separate library. Something like (outline):
Neatly fits the intention of Structured Concurrency. Tasks can also be allocated on the heap which allows you to have something more like what conventional threads or Go routines or Erlang processes do.
And protected objects come with built in mutexes and blocking conditions on entries to prevent race conditions or control system invariants.
https://en.wikipedia.org/wiki/Structured_concurrency