4 ms·
That's rather sad to hear. I presume some of it lives in Go and Nim. Don't know Ada, its tasks, even less.
by srean 6y ago
That's rather sad to hear. I presume some of it lives in Go and Nim.
Don't know Ada, its tasks, even less.
- pjmlp 6y agoYou can do a round over here, https://freepages.modula2.org/compi.html https://freepages.modula2.org/compi.html As for Ada tasks, https://learn.adacore.com/courses/intro-to-ada/chapters/tasking.html https://learn.adacore.com/courses/intro-to-ada/chapters/task...
- MaxBarraclough 6y agoAs someone who doesn't know Ada very well: Ada 'tasks' look like ordinary threads but with integrated message pumps. Is that about right?
- Jtsummers 6y agoThere'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): package body SomethingSomethingDarkside is procedure Foo(N : Integer) is task A ... task B ... task C ... task type D ... Bunch_Of_Ds : array (1..N) of D; begin DoStuff; end Foo; -- doesn't actually terminate until all the above terminate begin Foo; Put_Line("Won't be printed until after all of Foo's tasks finish."); end SomethingSomethingDarkside; -- 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 https://en.wikipedia.org/wiki/Structured_concurrency