Skip to content

fix(ringq): fix ring queue iterator logic - #710

Open
romancardenas wants to merge 1 commit into
tier4:mainfrom
romancardenas:fix-async-ringq
Open

romancardenas wants to merge 1 commit into
tier4:mainfrom
romancardenas:fix-async-ringq

Conversation

@romancardenas

Copy link
Copy Markdown

Description

While studying the source code of Awkernel, I noticed that the current implementation of iterator for RingQ failed in the corner case of the ring queue being full.

When full, tail and head have the same value. Therefore, the current iterator implementation would mistakenly return None.

How was this PR tested?

I added test functions to show that the proposed implementation now works as expected.

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

Successfully merging this pull request may close these issues.

1 participant