Raku provides a number of different concurrency mechanisms (and furthermore provides for a number of parallel programming approaches too, but I'll assume the question is really just about concurrency). The majority of what is in Raku can be found in other languages; for example:
- The
gather
/take
mechanism for lazily producing values. This is seen in various languages as generator functions; in Raku, however, there is not a single stack frame limit, so they are coroutine powerful. (This isn't of in any context involving asynchronous programming, but it's still meets the definition of concurrency).
- The
Promise
mechanism for conveying a single result of an asynchronous operation is a lot like Promise
s in JavaScript or Task
in .Net (the semantics are a bit closer to the latter).
- A
Supply
is a stream of asynchronous values. It has quite a bit in common with the reactive extensions (Rx), however has picked a naming and API that fits in with the overall Raku language design (for example, method names match their synchronous duals on sequences).
- A
Channel
is a concurrent queue, which has a mechanism to convey completion and error, which means that you can easily transition betwee the Supply
and Channel
paradigms. The key difference is that a Channel
has storage - you can put values into it, and immediately move on to do something else - while if you emit a value into a Supply
you pay the processing costs (giving a backpressure mechanism). Various architectures can be built using Channel
s, such as a staged event-driven architecture.
The most distinctive concept in Raku, which does not exist directly in other languages, is the react
/supply
/whenever
construct. Writing processors of multiple asynchronous streams is often challenging (subscription management, concurrency control); the construct provides a structured programming approach to it. Beyond that, it's mostly a question of language integration being a bit stronger in Raku, rather than treating these things just as libraries.
As others have noted, there's not much in the way of formal papers yet. However, these slides may be of interest (disclaimer: they're mine; I contributed to the Raku concurrency design, and invented react
/supply
/whenever
).