News for hackers. Stuff that matters.
Re:Don’t blindly prefer emplace_back to push_back by ywei3410 on Thursday March 04, 2021 @06:34AM (#26341155)
They're also an example of a data-structure which works pretty in a concurrent setting - you can get away with a single atomic reference for an unbounded FILO queue implemented with a linked list. Adding and removing items to it is then dirt-cheap - provided you don't go through the queue quickly and job running time > iteration time.

But with all things in computer science, it really depends on your use-case.

There are no comments on this comment yet.