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
I like Evgeny's answer - Queues are generally the best way to implement inter-thread communication. For completeness, here are some other options:
OperationalError
, but opening and closing connections like this is generally a No-No, due to performance overhead.