"The latter is more familiar to users of condition variables from before C++ gained them. It's also more efficient (or doesn't require optimization anyway) and easier to read as logic."
You know the lambda version just hides the while loop in the function, right? So it's harder to fully understand, and slightly less efficient in passing extra parameters and calling back into a lambda.
"The latter is more familiar to users of condition variables from before C++ gained them. It's also more efficient (or doesn't require optimization anyway) and easier to read as logic."
You know the lambda version just hides the while loop in the function, right? So it's harder to fully understand, and slightly less efficient in passing extra parameters and calling back into a lambda.