1
0
mirror of git://jb55.com/damus synced 2024-09-16 02:03:45 +00:00
damus/nostrdb
William Casarin 4e447ddbed ndb/txn: inherit active transactions on the same thread
Many different parts of the codebase could be opening transactions when
somewhere higher in the heirarchy on the main thread might already have
an active transaction. This can lead to failed transaction opening which
is bad.

Instead of relying on passing down the transaction to subviews, lets
keep track of the active transactions in a thread-local dictionary. That
way whenever we create a new transaction we can inherit the one that is
already active in the current thread.

Inherited transactions don't end the query when they are garbage
collected, we still expect the first-opened query to do this.
2023-12-04 13:26:24 -08:00
..
bindings ndb: update bindings 2023-10-23 10:39:27 +08:00
flatcc nostrdb: fix japanese profile names not loading 2023-11-02 10:20:40 +09:00
Test ndb/txn: inherit active transactions on the same thread 2023-12-04 13:26:24 -08:00
AsciiCharacter.swift ndb: make AsciiCharacter a CustomStringConvertible 2023-08-01 21:53:19 -07:00
copy-ndb ndb: remove patch from copy script, just use sed 2023-08-28 08:18:25 -07:00
cpu.h nostrdb: add cpu helper 2023-12-02 13:47:17 -08:00
jsmn.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
lmdb.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
mdb.c nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
memchr.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
midl.c nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
midl.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
Ndb.swift ndb: more dumb results building 2023-12-03 22:13:11 -08:00
NdbNote.swift ndb/txn: inherit active transactions on the same thread 2023-12-04 13:26:24 -08:00
NdbNote+.swift Make NostrDB (and related) code build under the new extension target as well. 2023-11-21 10:39:27 -08:00
NdbTagElem.swift ndb: switch to nostrdb notes 2023-08-03 13:20:36 -07:00
NdbTagIterator.swift ndb: sync up a few remaining NdbNote tag differences 2023-07-25 16:22:25 -07:00
NdbTagsIterator.swift ndb/note: always track note size, add to_owned 2023-12-03 22:12:31 -08:00
NdbTxn.swift ndb/txn: inherit active transactions on the same thread 2023-12-04 13:26:24 -08:00
nostrdb.c nostrdb/search: fix another newest-first bug 2023-12-02 15:04:23 -08:00
nostrdb.h nostrdb/search: allow searching from newest-to-oldest and oldest-to-newest 2023-12-02 13:44:03 -08:00
protected_queue.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
random.h ndb: make NostrEvents immutable 2023-07-25 15:34:05 -07:00
secp256k1_ecdh.h ndb: make NostrEvents immutable 2023-07-25 15:34:05 -07:00
secp256k1_extrakeys.h ndb: make NostrEvents immutable 2023-07-25 15:34:05 -07:00
secp256k1_schnorrsig.h ndb: make NostrEvents immutable 2023-07-25 15:34:05 -07:00
secp256k1.h ndb: make NostrEvents immutable 2023-07-25 15:34:05 -07:00
threadpool.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00
util.h nostrdb: pull latest, adding flatcc and lmdb 2023-08-25 19:05:34 -07:00