Improvements to thread safety during closely spaced edit events.

This applies primarily when beginUpdates / endUpdates is not used.
Due to user interaction-driven edits, like reloads or adding content
at the bottom, sometimes this is unavoidable in app design and thus
critical.

I have a diff in flight to make ASDataController / ASRangeController
robust against very aggressive thrash testing, which will be added
both to the unit test suite and this new example project.
This commit is contained in:
Scott Goodson
2015-06-21 21:04:09 -07:00
parent ed4ccfcc7f
commit c700618862
22 changed files with 794 additions and 44 deletions

View File

@@ -19,14 +19,16 @@
/**
* Working range controller.
*
* Used internally by ASTableView and potentially by a future ASCollectionView. Observes the visible range, maintains
* a working range, and is responsible for handling AsyncDisplayKit machinery (sizing cell nodes, enqueueing and
* cancelling their asynchronous layout and display, and so on).
* Used internally by ASTableView and ASCollectionView. It is paired with ASDataController.
* It is designed to support custom scrolling containers as well. Observes the visible range, maintains
* "working ranges" to trigger network calls and rendering, and is responsible for driving asynchronous layout of cells.
* This includes cancelling those asynchronous operations as cells fall outside of the working ranges.
*/
@interface ASRangeController : ASDealloc2MainObject <ASDataControllerDelegate>
/**
* Notify the receiver that the visible range has been updated.
* Notify the range controller that the visible range has been updated.
* This is the primary input call that drives updating the working ranges, and triggering their actions.
*
* @see [ASRangeControllerDelegate rangeControllerVisibleNodeIndexPaths:]
*/