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

Return value of bounded concurrent queue pop() #807

Closed
FloopCZ opened this issue Mar 18, 2022 · 4 comments · Fixed by #888
Closed

Return value of bounded concurrent queue pop() #807

FloopCZ opened this issue Mar 18, 2022 · 4 comments · Fixed by #888
Labels

Comments

@FloopCZ
Copy link

FloopCZ commented Mar 18, 2022

Hi everyone,

the OneAPI spec claims that concurrent bounded queue pop() function returns void:

void pop( value_type& result );

However, the implementation returns a bool:

bool pop( T& result ) {

What is the purpose of this boolean return value? Thank you.

@alexey-katranov
Copy link
Contributor

alexey-katranov commented Mar 18, 2022

It always returns true. It seems like misalignment with specification. However, changing the return value to void might break the existing code.

@FloopCZ
Copy link
Author

FloopCZ commented Mar 18, 2022

ok, thank you for the info
Maybe it could be changed in the next major version or mentioned in the docs, what do you think?

@alexey-katranov
Copy link
Contributor

Yes, it makes sense to mention somewhere, e.g. in release notes. I will follow up with the team.

The next major version is also an option but there is no any plans about the next major version.

@omalyshe omalyshe added the bug label Mar 21, 2022
@alexey-katranov
Copy link
Contributor

During team discussion, we agreed that it is a bug that can be fixed without waiting for the major version.

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

Successfully merging a pull request may close this issue.

3 participants