Gaming32/ArrayV

Parallel Block Merge mental breakdown

Closed this issue · 4 comments

Just run Parallel Block Merge Sort yourself and view the carnage.

For reference: https://youtu.be/0ae2q700NNc?t=8249

seems to be caused by the changes to Highlights.java
Confirmed that this bug is caused by something between 2f13f2d and e99782d (see #39).

Interestingly the behavior of the sort changes too - it fails despite its code not being altered

Cause identified: Highlights.clearAllMarks() was not synchronous. I have no clue how that fixes this.

Ah yes, threading without a GIL to keep you safe. always fun

clearAllMarks() is used by binary insertion sort which is used by parallel block merge, so I guess that's how it's relevant

still no clue how this alters the sort's behavior; the Highlights functions only modify Highlights properties
Oh, the issue was just that the exceptions thrown by the Highlights functions killed the sorting threads