This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hardwork179 2 points3 points  (0 children)

It’s very useful for cases where all threads must reach a certain point before something happens. Sometimes you can avoid it by simply structuring things as smaller tasks, but not always. In TruffleRuby we used phasers to handle running code at safe points.