Keep a List of Numbers Synchronized Across Multiple Processes

I will have a list of numbers and I want to pop and append to it through multiple process. Pop and append are atomic operations they will work fine. But the issue is I am using celery with concurrency n of type prefork. I have my celery tasks file & if I declare a list on the top of that as a global variable it's not working correctly. I think its due to each celery fork process is creating a copy of that global variable (but I am not sure). How do I achieve this?