Files
damus/damusTests
Daniel D’Aquino 7afcaa99fe Reduce race condition probability in Ndb streaming functions
This attempts to reduce race conditions coming from Ndb streaming
functions that could lead to lost notes or crashes.

It does so by making two improvements:
1. Instead of callbacks, now the callback handler uses async streams,
   which reduces the chances of a callback being called before the last
   item was processed by the consumer.
2. The callback handler will now queue up received notes if there are
   no listeners yet. This is helpful because we need to issue the
   subscribe call to nostrdb before getting the subscription id and
   setting up a listener, but in between that time nostrdb may still
   send notes which would effectively get dropped without this queuing
   mechanism.

Changelog-Fixed: Improved robustness in the part of the code that streams notes from nostrdb
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2025-10-24 16:25:44 -07:00
..
2025-08-11 16:40:01 -07:00
2025-06-16 10:34:18 -07:00
2025-10-13 15:16:54 -07:00
2025-10-13 15:16:54 -07:00
2025-08-11 16:40:01 -07:00
2025-10-13 15:16:54 -07:00
2025-08-11 16:40:01 -07:00