Add a comment about the assert in KisTiledExtentManager
We cannot reliably verify correctness of concurrent access to the
tile engine. Doing run-time verification would degrage performance
significantly. We can only catch faulty situation by side effects,
e.g. when KisTiledExtentManager's sees that the number of tiles
in a column became negative.
Invariants of the tiled data manager:
- if one thread writes to area rc, no other thread should read or write to this area
- concurrent and overlapping reads from the same rc are allowed, unless there is write operation touching this rc.
What happens if we break these invariants:
- ThreadA writes to rc, ThreadB reads from rc -> ThreadB will read garbage, no crash will happen, Krita can continue.
- ThreadA writes to rc, ThreadB writes to rc -> rc will contain garbage, no crash will happen, Krita can continue.
- ThreadA clears rc (or uses writeBytes), ThreadB reads or writes to rc -> extent manager will enter inconsistent state (or assert), Krita behavior is undefined.