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

Infinite loop management #47

Open
titouandk opened this issue Jan 11, 2024 · 0 comments
Open

Infinite loop management #47

titouandk opened this issue Jan 11, 2024 · 0 comments

Comments

@titouandk
Copy link

titouandk commented Jan 11, 2024

Hello,

First of all : nice work! Your code has been very useful to me 💯

There is just one little problem I think: the sleep instruction only executes if the data queue is not empty.

while True:
    ...
    if not data_queue.empty(): 
        ...
        sleep(0.25)

I may be wrong, but it seems to me that an indentation level should be removed on the sleep() call to prevent the infinite loop spam when the data queue is empty?

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