Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d726580 authored by Vasu Nori's avatar Vasu Nori
Browse files

yet another race condition fix to address bug:2456970

parent 8ca12281
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -57,8 +57,10 @@ public abstract class SQLiteProgram extends SQLiteClosable {
            mCompiledSql = new SQLiteCompiledSql(db, sql);

            // add it to the cache of compiled-sqls
            db.addToCompiledQueries(sql, mCompiledSql);
            // but before adding it and thus making it available for anyone else to use it,
            // make sure it is acquired by me.
            mCompiledSql.acquire();
            db.addToCompiledQueries(sql, mCompiledSql);
        } else {
            // it is already in compiled-sql cache.
            // try to acquire the object.