I at least showed you cppreference so you can look up the data structures and their guarantees.
True, but my problem was neither proper locking / thread safety, nor reference counting.
But you did blame the STL for concurrency bugs so there must have been something.
prefer to invite tons of unnecessary boilerplate
I'm not sure a heavily tested and fast lock free queue library is boilerplate.
You used C++'s dequeue, wouldn't that be boilerplate by this bizarre definition? Wouldn't everything?
I DO NOT THINK THAT. Why do you keep implying that my thinking is wrong? That is so arrogant of you.
That's good, I must have misunderstood since you were blaming concurrency bugs on the standard library data structures.
In my case, the queue was used as a "global" kind of object, so no reference counting needed.
I think you might have misunderstood that the reference counting is for anything returned from a data structure so that it can see that something is being used and not modify it. The reference counts of the returned object are actually pointers to the internal reference counts in the data structure, like checking out a library book.
This is not how I would do a queue though and not how the queues I linked work. They copy data in and out and are best used for small data. Large amounts of data can be handled in a different way by a different structure.
where did I imply making "double allocations"?
The C style allocation of structs to pointers then allocation of the underlying data is two allocations and double indirection. This isn't good for multi-threading because allocations have their price, just a heads up.
You're arguing all the time for just buying into stuff as a cargo cult
I don't think so, I've made a lot of stuff that works.
Don't explain basic C++ stuff to me. I understand it.
Well.. we all get bit by standard library assumptions from time to time and need to read the docs, but it just isn't a concurrency problem with the STL.
There's a lot of "abstraction" slop that brings more downsides than upsides.
Claims without evidence unfortunately. The fast concurrent queues I linked are great and using destructors to keep track of reference counts is great. Both are minimal. I would say inserting resource management manually into every function is boilerplate.