SQLite in a multithreaded java application

前端 未结 2 1179
心在旅途
心在旅途 2020-12-05 05:16

I have written a java application that sporadically logs events to an SQLite database from multiple threads. I\'ve noticed that I can trigger SQLite\'s \"Database Locked\"

2条回答
  •  难免孤独
    2020-12-05 05:35

    I use the same connection for multiple threads. in addition I had to make db-write methods synchronized, otherwise I still get bussy error

提交回复
热议问题