title: How to print the progress of cython's prange?
body: <p>I'm using prange for parallelizing a loop in my cython code. As this loop takes a long time, I want to print its progress as it goes. A progress bar would be nice but anything that shows the progress would do. I tried to add some form of logging in the following fashion:</p>
  
  <pre><code>for index in prange(n, nogil = True, num_threads = 5):
      if index == (index//1000)*1000:
          printf("%d percent done", index*100/n)
  </code></pre>
  
  <p>This should print the progress whenever <code>index % 1000 == 0</code>.
  The output of this is kind of random.</p>
  
  <pre><code>0 percent done
  80 percent done
  20 percent done
  100 percent done
  60 percent done
  </code></pre>
  
  <p>I assume that this is because prange does not assign threads to indexes starting from 0 and going up.
  Is there any way to implement such a thing in Cython?
  Thanks!</p>