Skip to content

Commit

Permalink
cleanup commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
daytime-em committed Oct 31, 2024
1 parent edb8888 commit f40197e
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ internal class CacheDatastore(
override fun close() {
logger.i("CacheInvest", "close() tid=${Thread.currentThread().id} called for datastore $this")
synchronized(dbGuard) {
// release reference from when we opened. if any loader threads are reading/writing then
// the db will close once they wind down
// dbHelper?.writableDatabase?.releaseReference()
sqlDb?.close()
dbHelper?.close()
dbHelper = null
Expand Down Expand Up @@ -409,8 +406,6 @@ internal class CacheDatastore(
@Throws(IOException::class)
private fun databaseOrThrow(): SQLiteDatabase {
synchronized(dbGuard) {
// val helper = dbHelper ?: throw IOException("CacheDatastore was closed")
// return helper.writableDatabase
return sqlDb?.takeIf { it.isOpen } ?: throw IOException("CacheDatastore was closed")
}
}
Expand Down

0 comments on commit f40197e

Please sign in to comment.