home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1724315591

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/2189#issuecomment-1724315591 https://api.github.com/repos/simonw/datasette/issues/2189 1724315591 IC_kwDOBm6k_c5mxvfH 9599 2023-09-18T20:24:30Z 2023-09-18T20:24:30Z OWNER

Using SQLite In Multi-Threaded Applications

That indicates that there's a SQLite option for "Serialized" mode where it's safe to access anything SQLite provides from multiple threads, but as far as I can tell Python doesn't give you an option to turn that mode on or off for a connection - you can read sqlite3.threadsafety to see if that mode was compiled in or not, but not actually change it.

On my Mac sqlite3.threadsafety returns 1 which means https://docs.python.org/3/library/sqlite3.html#sqlite3.threadsafety "Multi-thread: In this mode, SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads." - it would need to return 3 for that serialized mode.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1901416155  
Powered by Datasette · Queries took 0.715ms · About: github-to-sqlite