I am new to python flask REST web services. I am trying to create a leisure web service that will have a shared queue, several threads will be constantly written to this queue on the server side, and finally, when the user calls the GET methods, the service should return the first element in the shared queue.
I tried to start developing this by first implementing a shared variable, the next is the code I used,
from flask import Flask app = Flask(__name__) count= 0
But even the code above does not work. Then I use the cache for the shared variable, but that will not be the right way to implement the shared queue (my final goal). Please give me your advice.
source share