JuliaFolds2 / OhMyThreads.jl

Simple multithreading in julia
https://juliafolds2.github.io/OhMyThreads.jl/
MIT License
142 stars 9 forks source link

Barriers #74

Open carstenbauer opened 8 months ago

carstenbauer commented 8 months ago

In the spirit of OpenMP's #pragma omp barrier and MPI.Barrier() it would be nice to have a barrier for shared-memory parallelism in Julia. Taka has worked on this it seems (https://github.com/JuliaConcurrent/SyncBarriers.jl). Does this still work? Can we / do we want to integrate some of it into OhMyThreads.jl?

carstenbauer commented 7 months ago

This is also somewhat related to #73 (and the PR https://github.com/JuliaFolds2/OhMyThreads.jl/pull/93) because OMP has implicit barriers at the end of single/critical regions (IIRC) with an opt-out option nowait.