我得到一個當後臺線程正在將數據處理到數據庫時如何處理DB.close?
java.lang.IllegalStateException Cannot perform this operation because the connection pool has been closed.
,因爲我的應用程序從服務器獲取信息,並在其中background thread
寫的東西我SQLite database
處理它。
我在關閉應用程序時收到此錯誤,並且仍有後臺線程正在嘗試寫入封閉的數據庫。
我解決這個問題的最好方法是什麼?
掛起後臺線程? – JohnnyAW