Parallel operations in Dynamo and Refinery

I’ve mentioned this topic a few times in recent weeks, so it was really time to sit down and put pen to paper (or fingers to keyboard). This one was a lot of fun to dig into, and I think the results will be of interest to people.

Parallelism is something that I’ve been tracking since my studies during the 90s: I remember programming transputers using a programming language called occam, way back when. I was really happy when – around a decade ago – Microsoft got serious about tackling asynchrony and concurrency with F#’s Asynchronous Workflows and the .NET Framework’s Task Parallel Library. I had a lot of fun playing with both, mostly in the context of AutoCAD programming.

When my colleague Simon Breslav decided to try using Parallel.ForEach from IronPython code inside Dynamo, I was definitely intrigued, especially with respect to how that code would then work with Project Refinery.

Firstly, let’s discuss what Parallel.ForEach does, and how to use it inside Dynamo….

Read more