java - How to parallelize a for loop -


i try parallelize for in loop because want use in code parallel stream in java. problem is.. every time i've try don't entire result. mean... code should rotate image angle, if i'm doing parallelize receive half of image rotated.

one issue a, b, xx, yy variables being declared outside loop. different (interleaved) iterations overwrite values of these variables. instance,

  1. iteration 0 writes , b
  2. iteration 0 stop , iteration 1 starts , write , b
  3. scheduler goes iteration 0 values of , b iteration 1.

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -