Python sqlite3 and concurrency

前端 未结 14 919
南笙
南笙 2020-11-30 18:00

I have a Python program that uses the \"threading\" module. Once every second, my program starts a new thread that fetches some data from the web, and stores this data to my

14条回答
  •  遥遥无期
    2020-11-30 18:38

    I would take a look at the y_serial Python module for data persistence: http://yserial.sourceforge.net

    which handles deadlock issues surrounding a single SQLite database. If demand on concurrency gets heavy one can easily set up the class Farm of many databases to diffuse the load over stochastic time.

    Hope this helps your project... it should be simple enough to implement in 10 minutes.

提交回复
热议问题