title: Cannot perform operation because there is no current transaction when inserting into database
body: <p>In my Android application I have to insert data into several SQLite tables from different threads (one thread for insertion into one table and there are 5 tables). There are a lot of data so I use <code>beginTransaction()</code> -> <code>setTransactionSuccessful()</code> -> <code>endTransaction();</code> in every thread and all the threads start simultaneously, but in second or sometimes third thread I always got this exception: </p>
  
  <p><img src="https://i.stack.imgur.com/4Q9uN.png" alt="enter image description here"></p>
  
  <p>I use single SQLite connection (singleton) as was <a href="http://touchlabblog.tumblr.com/post/24474750219/single-sqlite-connection" rel="nofollow noreferrer">mentioned here</a> but nevertheless this problem remains.So I hope for some help.Thanks in advance!</p>
  
  <p>P.S And if I have race conditions what other way should I use for multithreaded insertion?</p>