acelyc111 opened a new pull request, #1458:
URL: https://github.com/apache/incubator-pegasus/pull/1458

   https://github.com/apache/incubator-pegasus/issues/887
   
   Add function cancel() for class defer to cancel the callback, it's useful
   if using defer to short circuit failures and cancel it after all conditions
   passed.
   
   For example:
   ```
   auto cleanup = dsn::defer([this]() { release_db(); });
   RETURN_NOT_OK(a);
   RETURN_NOT_OK(b);
   RETURN_NOT_OK(c);
   cleanup.cancel();
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to