Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFigure out a better way to handle IDBTransactions for IndexedDB #25328
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we register new transactions in the idb thread using a serial number that is associated with each transaction. This way, we are able to know which transaction we are refering to both in the script thread and in the idb thread. This could be considered a hack, and there is likely a better way of doing it.
One idea is to use channels, and let each
IDBTransactionhave a channel instead of a serial number. The receiving end is moved to the idb thread, and the sending end is saved in theIDBTransactionstruct. This way, we should be able to queue requests on the transactions using the channel instead a serial number.This would also mean that we can manage the transactions in a far better way.
Files
compontents/script/dom/idb_transaction.rscompontents/net/indexeddb