powersync-js icon indicating copy to clipboard operation
powersync-js copied to clipboard

update: using Datastream to queue onResult callbacks in watchWithCallback

Open Chriztiaan opened this issue 1 year ago • 0 comments

Description

Piggybacking on Steven's Datastream implementation.

This allows the watch to ensure that onResult callbacks are completed in the order in which they are triggered. For example, if the initial result takes long to complete it would block the second onResult call until it is done (This was a possible bug in the existing implementation where the initial result could complete after the second onResult leading to the result state being empty).

Chriztiaan avatar Apr 23 '24 12:04 Chriztiaan