Closed ahti closed 10 years ago
Good point. This will probably take a bit of work, but I think you're right that it needs to be done. I'll see what I can do today.
As I think about this, I think the move to thread-specific scope should actually require the block-based call, removing the old methods.
Turned out to be really easy. Thanks again.
I am not having any actual problems with this right now, but think of this scenario:
There is a sync engine, that syncs the local database with a webservice. After downloading a set of changes, it merges them into the local database. It wraps this in a notification batch to only notify the UI once after the sync completed.
Now, while the sync engine is going through a big set of changes, the user makes a change in the ui, which would normally cause a notification to fire that tells other parts of the ui to update. But since the sync engine is busy, this notification is delayed until it finishes syncing.
This potential problem could be addressed by making
-beginNotificationBatch
and-endNotificationBatchAndNotify:
affect the thread they are called on only.I think this change would make a lot of sense, but I am not quite sure wether there are any drawbacks. Just throwing it out there.
PS: I think it would also be nice to have another block-based method something like this: