lockfree
lockfree copied to clipboard
Support moveable objects and allow emplacing
This PR extends off of the months old #24 and it's recommended edits. Some additional work was done to make sure it also works with objects that are copy xor move constructible.
in general it looks good to me. i'd merge it, but it would be great if you could add some tests for it.
Tests have been added to spsc_queue_test.cpp to verify the move-only and copy-only structures behave as expected. Also fixed a few issues I came across in the process.
Can this please be go forward. I really need this and want to get rid of my own version (#27).
@tnovotny thanks for pinging me ... i'll look into it again over the next week
@timblechmann it would also be nice if you could also look at my pull request, because if I remember correctly, this will not suffice for move only types, as more of the existing API has to be disabled via enable_if
to compile something like spsc_queue<std::unique_ptr<..>>
.
I checked. I get a compile errors on
line 111 in bool push(T const & t, T * buffer, size_t max_size)
.
line 641 in bool push(T const & t).
line 856 in bool push(T const & t)
.
line 664 in bool consume_one(Functor & f)
...
@timblechmann so, here's pinging you again.
@timblechmann i find it really frustrating that you are showing no effort in maintaining this library. would you please give feedback on the outstanding pull requests.
@timblechmann and another two weeks.
Its 2021 now, what is stopping this PR from being merged? There is no emplace for this library, which is an important tool to create exception safe functions. This library is essentially dead?
Its 2021 now, what is stopping this PR from being merged? There is no emplace for this library, which is an important tool to create exception safe functions. This library is essentially dead?
not dead, but unfortunately the author cannot spend much time on it and has no use cases himself for move semantics. furthermore there were two "competing" PRs, which eventually both went stale.
happy to merge any merge-ready PR, though
trying to get my PR into boost::lockfree was a very frustrating experience. my PR (#27) was simply closed to go on with this one even though it did not support my use case of move only types such as unique_ptr. my changed PR (#41) received no feedback. so to me, at the time, it felt like this library was stale and eventually I just gave up.
happy to merge any merge-ready PR, though
Is #41 merge-ready? It has no conflicts.
Or, if this present PR is preferred, would resolving its merge conflicts make it merge-ready?
I say this just as a random person interested in this feature. I'd be willing to clean up this current PR if that's the desired route.
that was about my experience. poor to no feedback on this topic
Just to weigh in, I'd also love to see this functionality merged
Tim, what do you think now that C++98/03 is officially deprecated in Boost? https://pdimov.github.io/articles/phasing_out_cxx03.html
My personal opinion is to stop actively supporting 98/03, so if there are users who need it then it's up to them to actively provide that support in the form of PRs, etc.
And rather than surveying the community to inform a decision (which I did for another library), you'll find out pretty quickly if you just break it and see what happens. :)
Are there any prospects of this being merged?
for 1.86 i'll drop c++03/c++11 support and #90 will be merged