View Single Post
Old 03-10-2025, 03:56 PM   #45
Majutsushi
Zealot
Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'Majutsushi knows the difference between 'who' and 'whom'
 
Posts: 109
Karma: 10128
Join Date: Aug 2023
Location: New Zealand
Device: Kobo Clara HD, Kobo Libra Colour
I may be missing something, but the way the Database class copies the database around doesn't seem at all threadsafe to me. What happens in the following situation:
  • Thread A copies database to temporary location A and makes some changes
  • Thread B copies database to temporary location B and makes some changes
  • Thread A copies database back to the device
  • Thread B copies database back to the device
The changes thread A made would be lost. Or is there something in the architecture of Calibre that prevents this situation from happening?
Majutsushi is offline   Reply With Quote