【发布时间】:2014-07-12 22:10:03
【问题描述】:
我得到了一个
java.lang.IllegalStateException Cannot perform this operation because the connection pool has been closed.
因为我的应用程序从服务器获取信息并在background thread 中对其进行处理,该background thread 将内容写入我的SQLite database。
我在关闭应用程序时收到此错误,但仍有一个后台线程正在运行,试图写入已关闭的数据库。
解决这个问题的最佳方法是什么?
【问题讨论】:
-
暂停后台线程?
标签: java android multithreading sqlite android-sqlite