lockfree icon indicating copy to clipboard operation
lockfree copied to clipboard

Support moveable objects and allow emplacing

Open srjek opened this issue 8 years ago • 17 comments

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.

srjek avatar Feb 28 '17 03:02 srjek

in general it looks good to me. i'd merge it, but it would be great if you could add some tests for it.

timblechmann avatar Mar 02 '17 06:03 timblechmann

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.

srjek avatar Mar 02 '17 10:03 srjek

Can this please be go forward. I really need this and want to get rid of my own version (#27).

tnovotny avatar Jul 22 '17 06:07 tnovotny

@tnovotny thanks for pinging me ... i'll look into it again over the next week

timblechmann avatar Jul 22 '17 09:07 timblechmann

@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) ...

tnovotny avatar Jul 22 '17 20:07 tnovotny

@timblechmann so, here's pinging you again.

tnovotny avatar Aug 02 '17 18:08 tnovotny

@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.

tnovotny avatar Aug 26 '17 16:08 tnovotny

@timblechmann and another two weeks.

tnovotny avatar Sep 11 '17 19:09 tnovotny

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?

maierlars avatar Sep 11 '21 11:09 maierlars

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

timblechmann avatar Sep 11 '21 14:09 timblechmann

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.

tnovotny avatar Sep 11 '21 15:09 tnovotny

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.

jwdevel avatar Nov 11 '21 21:11 jwdevel

that was about my experience. poor to no feedback on this topic

tnovotny avatar Nov 22 '21 09:11 tnovotny

Just to weigh in, I'd also love to see this functionality merged

xim avatar Nov 23 '21 10:11 xim

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. :)

jeremy-murphy avatar Oct 22 '23 22:10 jeremy-murphy

Are there any prospects of this being merged?

intractabilis avatar Jan 26 '24 03:01 intractabilis

for 1.86 i'll drop c++03/c++11 support and #90 will be merged

timblechmann avatar Jan 26 '24 03:01 timblechmann