breez-sdk icon indicating copy to clipboard operation
breez-sdk copied to clipboard

[frb] Allow SDK streams to be re-initialised between sessions

Open erdemyerebasmaz opened this issue 9 months ago • 0 comments

This PR adds the ability to re-initialise SDK streams between sessions without the need for Stream & StreamSubscription management on Flutter side.

  • frb v2 is required to be able to wait for Rust function to finish execution before the stream can be obtained in Dart.
  • This feature prevents main thread to lock whenever a stream event needs to be emitted from Rust side and allows stream functions to be asynchronous, which enables us to set or update streams during initialisation.

There's no demand for it but this opens the ability to switch between event handler logic from UI during an ongoing session.

[In draft]

erdemyerebasmaz avatar May 18 '24 22:05 erdemyerebasmaz