I have a list in Python that I share between a few different processes (listproxy) and I need the ability to limit this list to a certain number of elements. The unit is running on a Raspberry Pi with all data stored in memory so I need the list to be able to be limited over time. The list stores log messages just to fill you in on the context, and we are willing to remove the earliest items as it fills up so it's a rolling list essentially. I know I could use an array and just pop off the bottom but then I'm running an O(n-1) operation to move all the elements over 1 element in that array. I can use a Queue, Stack, or Array for this, so long as they are multiprocessing friendly. I know I could create a linked list but I wanted to reach out in case someone else has an idea as a linked list isn't supported out of the box for multiprocessing so I would have to create one.
Thanks in advance!