X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fexperimental%2FEventCount.h;h=1496b8b17139d6cddc8fdbf1237a306fe427e193;hb=b26334e5f85126a4ebe1c514d4790b98f2c2bbe1;hp=f2f806cb0bac7de5228c757cfb33b2fa186d3dc2;hpb=d4aacd244f21e76dce685365acc281a9015897c1;p=folly.git diff --git a/folly/experimental/EventCount.h b/folly/experimental/EventCount.h index f2f806cb..1496b8b1 100644 --- a/folly/experimental/EventCount.h +++ b/folly/experimental/EventCount.h @@ -175,7 +175,9 @@ inline void EventCount::wait(Key key) noexcept { template void EventCount::await(Condition condition) { - if (condition()) return; // fast path + if (condition()) { + return; // fast path + } // condition() is the only thing that may throw, everything else is // noexcept, so we can hoist the try/catch block outside of the loop