Andreas Rumpf


Malebolgia - Structured Concurrency for Nim

Andreas Rumpf

In this talk, Andreas will showcase his library for "structured" concurrency and parallelism in Nim. The implementation of a "spawn" construct is presented, which statically enforces that allparallel tasks will eventually "join" the main thread of execution. This is known as"structured" concurrency, as it strongly resembles "structured" control flow programming techniques that have replaced older programming methods based on "goto." This "structured" approach to concurrency offers numerous non-obvious benefits: It not only makes the code easier to understand, but also improves the efficiency of the resulting machine code and allows us to focus on a single language construct: "spawn". No channels, locks, dataflow variables, or other synchronization data structures are required. While "spawn" doesn't necessitate other synchronization primitives, it does work well with them. Therefore, in this talk, Andreas will also demonstrate how to combine `spawn` with channels, locks, and even lock-free programming techniques. Lastly, he will discuss the implementation details of Malebolgia, the thought process behindthe design decisions, and present some benchmark results.

This talk does not require prior knowledge of the Nim programming language and should be interesting to anyone interested in parallelism and concurrency. It provides completely new insights into this problem domain.

Starting from: $500

Unchain your mind at LambdaConf 2024

Buy tickets