Multi-threading packages - preferences, use cases. recommendations?

I have so far not specifically needed to multi-thread any of my code. I have, out of curiosity, tossed the odd @threads in front of one or two for loops to see if it made enough of a difference to bother, but the calculations didn’t justify the overheads.

I am now looking at some work that has (I believe) some potential to multithread (a large number of identical calculations on an array of independent inputs). While I am perfectly happy to work with the standard Threads library, I noticed a surprisingly large number of (helper) packages to facilitate multithreading.

As someone who has not thought about this much before, I was wondering what the preferred packages are in this area? I have scanned through the documentation of a few (Polyester.jl, ThreadPools.jl, ThreadsX.jl, FLoops.jl, etc.) and they all seem to be very interesting and user-friendly. I, however, can put aside time to learn only one or two of these.

Which package would be a good choice for the casual, non-expert user? And for what type of application, assuming there are horses for courses here? Even if this purely a personal preference, and not a technical recommendation, I would love to hear what people who actually use this would recommend.

OhMyThreads.jl is almost certainly what you’re looking for

3 Likes

More generally, some of the links you posted point to the JuliaFolds organization (first of its name), which is now inactive. Development is happening over in JuliaFolds2, where you can find

  • the forks of everything that was in JuliaFolds
  • new niceties such as OhMyThreads.jl
1 Like