I have a concurrency related issue involving queries. Here is an example code using an in Memory DB. One thread making queries and another thread making inserts. At some point,