mardi 17 mars 2015

What are the disadvantages of sharing a single sqlite connection (or any database connection) with multiple threads?

I have read on several pages on stackoverflow.. which advise on using a separate connection for each thread but does not mention what are the bad effects of not doing so. Can you please explain what are the concurrency issues or latency/speed issues for reads or writes when using the same connection for multiple threads.


Also why a new connection be used for each thread ? Also, what does it mean.. when somebody mentions that it is 'thread-safe' ?


Aucun commentaire:

Enregistrer un commentaire