Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FifoDiskQueue Size is Getting Bigger #57

Open
DavidDr90 opened this issue Jul 24, 2022 · 0 comments
Open

FifoDiskQueue Size is Getting Bigger #57

DavidDr90 opened this issue Jul 24, 2022 · 0 comments

Comments

@DavidDr90
Copy link

I'm trying to implement a fixed size queue using FifoDiskQueue.
My code is:

self._images_data = FifoDiskQueue(r"c:\temp")
...
# this code is inside a loop
# implement fixed size queue
if len(self._images_data) >= 400:
      self._images_data.pop()
self._images_data.push(frame.tobytes()) # add the new frame to the main data base
...
# after the while ends running:
self._images_data.close()

I'm seeing two issues:

  1. While the main loop is running the queue file q00000 is always 0 KB
  2. My memory is decreasing meaning the queue is keep getting bigger and bigger although I'm "pop" out any old element before adding new one

Can some help me figure out why the size keep getting bigger or point me to the right way to implement a fixed size queue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant