Comments (2)
(Reposting from the realm-cocoa thread...):
I would suggest you look at the implementation for ABFRealmGridController because this is a UICollectionViewController
subclass that is using RBQFRC as its backing data source. It automatically updates based on results from the New York Times API and animates the changes... I have never encountered the scenario you describe.
from rbqfetchedresultscontroller.
The issue was related to how Realm notifies other Realm instances to update. When you commit a write transaction on a background thread, a notification is then sent to other Realm instances on other threads (this works through a named pipe) to refresh to the latest version of the DB that includes the recently committed transaction. The problem though is that notification is processed on the receiving thread only during the default run loop mode. When you are scrolling, the main thread will run in NSEventTrackingRunLoopMode
for that pass of the run loop. This means that Realm's notification will not be processed until the thread is back in default mode.
The result of this means that RBQFetchedResultsController
should simply manually call refresh
on the Realm that contains the objects backed by the FRC before attempting to retrieve it. This alleviates the assumption that the notification to trigger the refresh has been processed before object/safeObjectAtIndexPath:
is called.
I can confirm this commit fixes the problem: 03de5b6
from rbqfetchedresultscontroller.
Related Issues (20)
- Support transient properties for sectionNameKeyPath HOT 4
- Don't release delegate HOT 5
- Crash on `performFetch` - Index is out of bounds
- Ability to turn off excessive logging for debug builds HOT 3
- When init with a empty realm, the `notificationCollection`'s `notificationBlock` might never got call
- Dead lock when FRC -updateFetchRequest in main thread and -calculateChangesWithAddedSafeObjects in background within same time;
- RBQFetchedRequest support for Properties to Group By
- Swift3 no notification passed to the delegate HOT 1
- RealmSwift 2.1.1 HOT 1
- Reintroduce Git Submodules for RBQSafeRealmObject and RealmUtilities HOT 1
- Crash when deleting sectioned objects.
- Constant crash. HOT 1
- Delegate never released HOT 7
- Update Realm dependency to 2.2
- Sorting with localizedCaseInsensitiveCompare
- SectionNameKeyPath cannot be transient? HOT 1
- Can't support Realm 3.0.0? HOT 6
- can not support Realm (3.7.4)
- Not working with swift 4
- Could you make unregisterChangeNotifications public
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbqfetchedresultscontroller.