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

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

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -