What local storage in html5 can I use safely in the browser ui thread and the web worker thread
问题 I've been trying to use web sql database api in webkit based browsers. I have been using the async api in the main ui thread and a web worker . Both threads access the same database (which as you know is sqlite underthehood) Everything behaves fine but occassionally transactions are lost or one transaction fails and it seems to be a timing/race condition. It appears access to the underlying sqlite database is not thread-safe. A bit more background. My web worker is simply executing a query