x2c3z4 commented on a change in pull request #1669:
URL: https://github.com/apache/incubator-brpc/pull/1669#discussion_r790812822



##########
File path: src/bthread/mutex.h
##########
@@ -48,15 +48,15 @@ class Mutex {
     Mutex() {
         int ec = bthread_mutex_init(&_mutex, NULL);
         if (ec != 0) {
-            throw std::system_error(std::error_code(ec, 
std::system_category()), "Mutex constructor failed");
+            CHECK(false) << "Mutex constructor failed";
         }
     }
     ~Mutex() { CHECK_EQ(0, bthread_mutex_destroy(&_mutex)); }
     native_handler_type native_handler() { return &_mutex; }
     void lock() {
         int ec = bthread_mutex_lock(&_mutex);
         if (ec != 0) {
-            throw std::system_error(std::error_code(ec, 
std::system_category()), "Mutex lock failed");

Review comment:
       What codebase will it break? I don't understand why needs to throw 
exception here.
   




-- 
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