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

resilience and usability #25

Closed
wants to merge 2 commits into from
Closed

resilience and usability #25

wants to merge 2 commits into from

Conversation

DBJDBJ
Copy link

@DBJDBJ DBJDBJ commented Feb 3, 2019

I have added some simple changes and a lot of comments for proposed further changes.
All aimed at improving the resilience and usability of the cicrcular_buffer.

Please look into the file ...

I have added some simple changes and a lot of comments for proposed further changes. 
All aimed at improving the resilience and usability of the cicrcular_buffer.
@phillipjohnston
Copy link
Member

@DBJDBJ thank you for your suggestions. I had originally created this class as a simple example, so many of these changes were just left out. However, your suggestions certainly improve the design and mimic the class as I actually use it within my own framework. I will work the changes in along with a new update to the article.

The one area I don't understand is why you use a separate class for SBRM locking of the mutex instead of std::lock_guard.

@phillipjohnston
Copy link
Member

phillipjohnston commented Feb 4, 2019

Also, for a more complete class I recommend Martin Moene's ring-span-lite, which is similar to the standard proposal for ring-view/ring-span.

@DBJDBJ
Copy link
Author

DBJDBJ commented Feb 5, 2019

Separate SBRM (as presented) is re-usable. The only reason it is separate.
ring-span-lite is v. good but :) I always start with simple but functional class implemented (not invented) "in the house" .. as a project progresses that is updated accordingly if need to be ... very often this gradually delivers an exact match for the project, v.s. general design and implementation that tries to satisfy "everyone".

It is very likely ring-span-lite (just as an example) will be not a "drop-in replacement" for your circular_buffer ... and time is a scarce resource :)

Good work btw...

contains `cpp11::make_unique` , for non-arrays and arrays too
@phillipjohnston
Copy link
Member

Many improvements are folded in to the circular buffer rewrite

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.

2 participants