How do I parallelize a while loop?

I’m not familiar with how, but SO had a question similar to this. There is an illuminating comment at the bottom by @ChrisRackauckas as well.

Also here on this board.
And a recent presentation at UIC.