Skip to content

Implement queue.count() #11145

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

Merged
merged 1 commit into from
Aug 6, 2019
Merged

Conversation

Tharazi97
Copy link
Contributor

@Tharazi97 Tharazi97 commented Aug 1, 2019

Description

Implements queue.count() which returns amount of items in the queue. As it is asked in: #10535

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[x] Functionality change
[x] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@Terryvanderjagt @maciejbocianski @jamesbeyond @0xc0170 @mprse

Release Notes

@ciarmcom
Copy link
Member

ciarmcom commented Aug 1, 2019

@Tharazi97, thank you for your changes.
@mprse @maciejbocianski @jamesbeyond @0xc0170 @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@mprse mprse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

rtos/Queue.h Outdated
@@ -107,6 +107,17 @@ class Queue : private mbed::NonCopyable<Queue<T, queue_sz> > {
return osMessageQueueGetSpace(_id) == 0;
}

/** Check the quantity of items in queue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not really a check. To be more precise, you could write:
"Get number of queued messages in the queue"
and
@return Number of items in the queue

@Tharazi97 Tharazi97 force-pushed the CountFunctionQueue branch from 4ce0bb1 to 32bdde5 Compare August 2, 2019 06:50
@evedon
Copy link
Contributor

evedon commented Aug 2, 2019

@Tharazi97 Please mark this code change as functionality change and docs update.

@mbed-ci
Copy link

mbed-ci commented Aug 5, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

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

Successfully merging this pull request may close these issues.

6 participants