mev-boost-relay icon indicating copy to clipboard operation
mev-boost-relay copied to clipboard

Avoid race condition on conditional variable

Open kushalbabel opened this issue 2 years ago • 2 comments

cannot assume that the if condition is true when Wait returns. always best to check in a while loop to avoid race condition.

kushalbabel avatar Apr 10 '24 19:04 kushalbabel

I think you would also need to read the counter again to get the updated value

ralexstokes avatar Apr 10 '24 21:04 ralexstokes

Oh yes, that's right.

kushalbabel avatar Apr 10 '24 21:04 kushalbabel