This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年11月19日 07:40 by strcat, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg175946 - (view) | Author: Daniel Micay (strcat) | Date: 2012年11月19日 07:40 | |
The sqlite3 documentation now includes a Multithreading section explaining issues with older sqlite versions, but still doesn't directly cover disabling check_same_thread beyond listing it as a possible parameter. As far as I can tell, reusing sqlite connections in different threads (such as from a pool) is safe, as long as no attempt is made to use them from multiple threads with no locking. |
|||
| msg223245 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年07月16日 18:22 | |
@Daniel could you provide a patch for this? |
|||
| msg223304 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2014年07月17日 00:26 | |
The module docs do mention "Older SQLite versions had issues with sharing connections between threads." Presumably that means that sharing the connection between threads is safe so long as you're not using 'older versions', but it would be nice to have some more clarity about how old those versions are. |
|||
| msg223305 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2014年07月17日 00:29 | |
This page also looks relevant: sqlite can be compiled or used in three different threading modes. Presumably Python compiles/initialises it in the serialised mode, which makes it safe to use a connection from different threads. http://www.sqlite.org/threadsafe.html |
|||
| msg266353 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2016年05月25日 13:41 | |
Issue 27113 has a patch and more detailed description so I'm going to close this one as a 'duplicate'. Thanks for the report! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:38 | admin | set | github: 60713 |
| 2016年05月25日 13:41:01 | berker.peksag | set | status: open -> closed superseder: sqlite3 connect parameter "check_same_thread" not documented nosy: + berker.peksag messages: + msg266353 resolution: duplicate stage: needs patch -> resolved |
| 2014年07月17日 00:29:03 | takluyver | set | messages: + msg223305 |
| 2014年07月17日 00:26:27 | takluyver | set | messages: + msg223304 |
| 2014年07月16日 18:22:34 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg223245 |
| 2013年01月28日 23:36:37 | takluyver | set | nosy:
+ takluyver |
| 2013年01月10日 15:20:31 | r.david.murray | set | nosy:
+ r.david.murray |
| 2012年11月23日 17:18:16 | ezio.melotti | set | nosy:
+ ghaering stage: needs patch versions: + Python 3.2, Python 3.4 |
| 2012年11月19日 07:40:51 | strcat | create | |