添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Python websocket multithread/ multiprocess storing the received JSON data in one thread questions

For my development, I’m trying to have two threads.

One threads is for receiving real time data and put them into a list/dictionary(which one should I use to store the JSON I received?)

And the other thread is to loop through the list/dictionary and print out the data in the JSON object/string we need.(not all the fields are needed in the received JSON data)

But the second thread doesn’t start.

The reason to use multithread is because we don't want to miss out on updated data when the program is printing the data(eventually, the "print" action will be replaced by updated our database)

What is the problem?

I could provide my code if it's needed.

Thank you.

python #technology websockets json Comment