RxSwiftCommunity / RxGRDB

Reactive extensions for SQLite
MIT License
218 stars 35 forks source link

Enhance the scheduling of database changes notifications #18

Closed groue closed 6 years ago

groue commented 6 years ago

RxGRDB used to let user control the dispatching of database changes notifications by the way of raw Dispatch queues. This PR uses RxSwift schedulers instead.

The main benefit is that it is no longer possible to misuse the library by subscribing and observing a database observable on distinct dispatch queues. This misuse would drop the guarantee that database changes are emitted in the same chronological order as database transactions, with subtle and hard-to-reproduce consequences.

This PR also brings a drastic simplification of diff computations, by relying on RxSwift's ready-made scan operator.

Doc, tests, and demo app have been updated.

groue commented 6 years ago

Superseded by #19, which targets the develop branch