Do colored subprograms exist in Ada?
I was reading today about a proposal regarding the Rust language’s use of async
and await
. which are related to colored subprograms. If you’re familiar with them, read on; if not, click the blurred text at bottom for a hopefully-correct explanation.
I naturally wondered how this issue affects Ada. I’m not as familiar with task
types as I should be, even though I used them a few years ago, and Ada 2022 brings the new parallel
keyword, which I have yet to use. After refreshing my memory:
Is my impression correct that Ada’s approach to concurrency and parallelism circumvents “colored” subprograms altogether? After all, task entries are called just like regular subprograms, and subprograms with parallel
blocks are called just like other subprograms.
My apologies if I’m being unclear; please don’t hesitate to correct or scold me if I’m babbling nonsense. I know what I’m trying to say, but I’m not used to talking about these particular issues.
6 posts - 4 participants