python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Does std::terminate() trigger stack unwinding?
I've been trying to implement Exception class, and for program termination i've decided to use std::terminate(), but i'm not suse whether or not std::terminate() triggers stack unwinding process.
For ...
SoldatovAndrey
Votes: 0
Answers: 1
RAII locking with condition
I have a piece of code which needs to be protected by a lock only if some condition is true.
if(condition) {
std::lock_guard<std::mutex> guard(some_mutex);
// do a bunch of things
} els...
0Nicholas
Votes: 0
Answers: 1
Concise RAII for Trompeloeil mocks
I have classes like this:
/* "Things" can be "zarked", but only when opened, and they must be closed afterwards */
class ThingInterface {
public:
// Open the thing for exclusive...
Inductiveload
Votes: 0
Answers: 1
RAII: do mutexes in a vector declared in a loop all unlock in the next iteration?
Suppose I have the following:
// ... necessary includes
class X {
struct wrapper{ std::mutex mut{}; }
std::array<wrapper, 20> wrappers{};
void Y()
{
for (auto i{0u}; i...
SRSR333
Votes: 0
Answers: 1