Iglistkit: Multiple ListBindingSectionController updates in quick succession makes completion block fail

Created on 6 Aug 2018  Â·  4Comments  Â·  Source: Instagram/IGListKit

I have real time updates to the data within my ListBindingSectionController. This involves retrieving data from a server, updating local variables, then calling self.update(animated: false).

Sometimes a race condition occurs with data retrieved from the server and the calling of update(animated:) which forces the last update(animated:) call to not complete. This leads to inconsistencies within the section controller. Is there any way to make sure that all updates will be completed, like queueing them?

bug question

Most helpful comment

Yup, this looks like a bug. We should be queuing completion blocks and executing all of them on unload.

All 4 comments

What do you mean not complete? Like the completion block?

Sent with GitHawk

Sorry, I mean that the completion block gets called but the completed variable returned from the update function is false. So I guess the update function gets cancelled because there’s already an update going on.

Sent with GitHawk

Sorry, I mean that the completion block gets called but the completed variable returned from the update function is false. So I guess the update function gets cancelled because there’s already an update going on.

Sent with GitHawk

ListBindingSectionController Not have Queue, I have the same problem。

Yup, this looks like a bug. We should be queuing completion blocks and executing all of them on unload.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreamazz picture andreamazz  Â·  16Comments

rnystrom picture rnystrom  Â·  24Comments

rafalszastok picture rafalszastok  Â·  18Comments

jessesquires picture jessesquires  Â·  19Comments

ishabazz picture ishabazz  Â·  24Comments