You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/04/24 11:51:18 UTC

[GitHub] [incubator-brpc] yanglimingcn opened a new pull request, #1751: butex_wake_all support nosched flag

yanglimingcn opened a new pull request, #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751

   butex_wake*的需求 #1749


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#issuecomment-1110456000

   > 如果在TaskGroup::exchange的参数变成 TaskGroup::exchange(TaskGroup** pg, bthread_t next_tid, bool nosched, bool nosignal) 把nosched的逻辑放到exchange里面,整个代码逻辑能更简单些。但是exchange的本意就是要切换协程,不知道这样是否合理。
   
   exchange本意是切换协程,加上nosched参数不太合理。但是nosignal参数是有意义的。


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] butex_wake_all support nosignal flag (brpc)

Posted by "MrGuin (via GitHub)" <gi...@apache.org>.
MrGuin commented on PR #1751:
URL: https://github.com/apache/brpc/pull/1751#issuecomment-1853376676

   > nosched参数是不是可以去掉了,如果nosignal是true,就不要调用exchange,而是调用ready_to_run 另外,我觉得exchange里面的nosignal=true会有问题,因为当前协程切出去了,再次回来需要一个flush,这个flush不知道谁去执行。这和其它地方的nosignal不一样,其它地方都是本协程唤醒其它协程,最后执行一次flush
   
   no_signal 为 true,不调用 exchange,ready_to_run* 会传递 no_signal 参数,被唤醒的 bthread 不就无法被及时调度了吗?
   我们有同样的场景,不希望当前执行 butex_wake 的 bthread 被 exchange 转去执行被唤醒的 bthread,所以使用了这个 feature,现在观察到被唤醒的 bthread 从唤醒到被调度执行会有上百毫秒的延迟,因为现在的实现 no_signal 传递给了 ready_to_run*,导致无法被及时调度处理。
   


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#issuecomment-1127154396

   > > nosched参数是不是可以去掉了,如果nosignal是true,就不要调用exchange,而是调用ready_to_run 另外,我觉得exchange里面的nosignal=true会有问题,因为当前协程切出去了,再次回来需要一个flush,这个flush不知道谁去执行。这和其它地方的nosignal不一样,其它地方都是本协程唤醒其它协程,最后执行一次flush
   > 
   > 你的意思是只需要支持nosched=true && nosignal=true 和 nosched=false && nosignal=false这两种场景是吗? 如果暂时没有nosched=true && nosignal=false和nosched=false && nosignal=true这两种场景的需求,也可以先去掉nosched参数。将来有需求再添加
   
   嗯,这个需求最初的意思其实是让当前协程不被切换出去,尽量把一些事情处理完了,再统一去调度其他的协程。我再发出一般,你再Review一下。


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] butex_wake_all support nosignal flag (brpc)

Posted by "MrGuin (via GitHub)" <gi...@apache.org>.
MrGuin commented on PR #1751:
URL: https://github.com/apache/brpc/pull/1751#issuecomment-1853427709

   现在我这里每次 butex_wake 后主动调 bthread_flush 解决了不能及时调度的问题。
   我看了下上下文,感觉当前的 no_signal 的实现针对场景是消费者 bthread 批量 butex_wake,然后再一次 bthread_flush,no_signal 参数不希望被调度,顺带也不会把当前 bthread 给 exchange 过去。但如果消费者无法批量去 butex_wake 最后统一 flush 的话,就只能传 no_signal 参数然后手动去 bthread_flush 了。
   比如我们是 braft 状态机 on_apply 线程,每次修改状态机然后唤醒等待在 butex 上的 RPC线程,因为每个 raft group 的 on_apply 是严格串行的,是性能瓶颈,所以我们不希望它在唤醒别人的时候被切走,所以传了 no_signal,但被唤醒的 RPC bthread 也是要及时调度执行的,不然会影响 RPC 服务的 responsiveness。如果只是要达到不让当前调用 butex_wake 的线程被 exchange 走的效果,只能 no_signal 然后 bthread_flush,感觉不够优雅。
   @wwbmmm 佬怎么看呢?


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r858260338


##########
src/bthread/butex.cpp:
##########
@@ -319,11 +329,13 @@ int butex_wake_all(void* arg) {
         return nwakeup;
     }
     // We will exchange with first waiter in the end.
-    ButexBthreadWaiter* next = static_cast<ButexBthreadWaiter*>(
-        bthread_waiters.head()->value());
-    next->RemoveFromList();
-    unsleep_if_necessary(next, get_global_timer_thread());
-    ++nwakeup;
+    ButexBthreadWaiter* next =
+        static_cast<ButexBthreadWaiter*>(bthread_waiters.head()->value());
+    if (!nosched) {
+        next->RemoveFromList();
+        unsleep_if_necessary(next, get_global_timer_thread());
+        ++nwakeup;
+    }
     TaskGroup* g = get_task_group(next->control);

Review Comment:
   这块已经修改了



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#issuecomment-1126584275

   nosched参数是不是可以去掉了,如果nosignal是true,就不要调用exchange,而是调用ready_to_run


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r873297222


##########
src/bthread/countdown_event.h:
##########
@@ -39,7 +39,7 @@ class CountdownEvent {
     void reset(int v = 1);
 
     // Decrease the counter by |sig|
-    void signal(int sig = 1);
+    void signal(int sig = 1, bool nosignal = false);

Review Comment:
   这个函数叫signal,然后参数叫nosignal,感觉怪怪的。。
   是不是加点注释说明一下



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm merged pull request #1751: butex_wake_all support nosignal flag

Posted by GitBox <gi...@apache.org>.
wwbmmm merged PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r858258186


##########
src/bthread/butex.cpp:
##########
@@ -284,15 +286,19 @@ int butex_wake(void* arg, bool nosched) {
         if (!nosched) {
             TaskGroup::exchange(&g, bbw->tid);

Review Comment:
   exchange是希望调度的,所以应该是默认signal的,此外exchange也没有nosignal的参数



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r857521566


##########
src/bthread/countdown_event.cpp:
##########
@@ -50,7 +50,7 @@ void CountdownEvent::signal(int sig) {
         return;
     }
     LOG_IF(ERROR, prev < sig) << "Counter is over decreased";
-    butex_wake_all(saved_butex);
+    butex_wake_all(saved_butex, true);

Review Comment:
   这里修改了框架的默认行为了,是不是不太合适
   可以给signal函数也加个nosched参数?



##########
src/bthread/butex.cpp:
##########
@@ -335,13 +347,18 @@ int butex_wake_all(void* arg) {
         g->ready_to_run_general(w->tid, true);
         ++nwakeup;
     }
-    if (saved_nwakeup != nwakeup) {
+    if (nosignal) {
+        tls_task_group_nosignal = g;
+        nwakeup = 0;
+    } else if (saved_nwakeup != nwakeup) {
         g->flush_nosignal_tasks_general();
     }
-    if (g == tls_task_group) {
-        TaskGroup::exchange(&g, next->tid);
-    } else {
-        g->ready_to_run_remote(next->tid);
+    if (!nosched) {
+        if (g == tls_task_group) {
+            TaskGroup::exchange(&g, next->tid);

Review Comment:
   这里是不是也要传nosignal



##########
src/bthread/butex.cpp:
##########
@@ -284,15 +286,19 @@ int butex_wake(void* arg, bool nosched) {
         if (!nosched) {
             TaskGroup::exchange(&g, bbw->tid);

Review Comment:
   exchange是不是也要传nosignal参数进去



##########
src/bthread/butex.cpp:
##########
@@ -319,11 +329,13 @@ int butex_wake_all(void* arg) {
         return nwakeup;
     }
     // We will exchange with first waiter in the end.
-    ButexBthreadWaiter* next = static_cast<ButexBthreadWaiter*>(
-        bthread_waiters.head()->value());
-    next->RemoveFromList();
-    unsleep_if_necessary(next, get_global_timer_thread());
-    ++nwakeup;
+    ButexBthreadWaiter* next =
+        static_cast<ButexBthreadWaiter*>(bthread_waiters.head()->value());
+    if (!nosched) {
+        next->RemoveFromList();
+        unsleep_if_necessary(next, get_global_timer_thread());
+        ++nwakeup;
+    }
     TaskGroup* g = get_task_group(next->control);

Review Comment:
   这里可能要先判断一下,如果nosignal且tls_task_group_nosignal不为空,则g = tls_task_group_nosignal



##########
src/bthread/butex.cpp:
##########
@@ -335,13 +347,18 @@ int butex_wake_all(void* arg) {
         g->ready_to_run_general(w->tid, true);
         ++nwakeup;
     }
-    if (saved_nwakeup != nwakeup) {
+    if (nosignal) {
+        tls_task_group_nosignal = g;
+        nwakeup = 0;
+    } else if (saved_nwakeup != nwakeup) {
         g->flush_nosignal_tasks_general();
     }
-    if (g == tls_task_group) {
-        TaskGroup::exchange(&g, next->tid);
-    } else {
-        g->ready_to_run_remote(next->tid);
+    if (!nosched) {
+        if (g == tls_task_group) {
+            TaskGroup::exchange(&g, next->tid);
+        } else {
+            g->ready_to_run_remote(next->tid);

Review Comment:
   同上



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#issuecomment-1110401166

   如果在TaskGroup::exchange的参数变成 TaskGroup::exchange(TaskGroup** pg, bthread_t next_tid, bool nosched, bool nosignal) 把nosched的逻辑放到exchange里面,整个代码逻辑能更简单些。但是exchange的本意就是要切换协程,不知道这样是否合理。


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r867582179


##########
src/bthread/task_group_inl.h:
##########
@@ -46,10 +46,10 @@ inline TaskMeta* TaskGroup::address_meta(bthread_t tid) {
     return address_resource(get_slot(tid));
 }
 
-inline void TaskGroup::exchange(TaskGroup** pg, bthread_t next_tid) {
+inline void TaskGroup::exchange(TaskGroup** pg, bthread_t next_tid, bool nosignal) {
     TaskGroup* g = *pg;
     if (g->is_current_pthread_task()) {
-        return g->ready_to_run(next_tid);
+        return g->ready_to_run(next_tid, nosignal);
     }
     ReadyToRunArgs args = { g->current_tid(), false };

Review Comment:
   这个false要改成nosignal



##########
src/bthread/butex.cpp:
##########
@@ -335,13 +348,20 @@ int butex_wake_all(void* arg) {
         g->ready_to_run_general(w->tid, true);
         ++nwakeup;
     }
-    if (saved_nwakeup != nwakeup) {
+    if (nosignal) {
+        if (!tls_task_group) {
+            tls_task_group_nosignal = g;

Review Comment:
   这个移到get_task_group逻辑里,参考上面评论



##########
src/bthread/butex.cpp:
##########
@@ -281,14 +282,24 @@ int butex_wake(void* arg) {
     unsleep_if_necessary(bbw, get_global_timer_thread());
     TaskGroup* g = tls_task_group;
     if (g) {
-        TaskGroup::exchange(&g, bbw->tid);
+        if (!nosched) {
+            TaskGroup::exchange(&g, bbw->tid, nosignal);
+        } else {
+            g->ready_to_run_general(bbw->tid, nosignal);
+        }
     } else {
-        bbw->control->choose_one_group()->ready_to_run_remote(bbw->tid);
+        bbw->control->choose_one_group()->ready_to_run_remote(bbw->tid, nosignal);

Review Comment:
   参考start_from_non_worker的逻辑,这里应该类似于
   ```cpp
      if (nosignal) {
           g = tls_task_group_nosignal;
           if (NULL == g) {
               g = c->choose_one_group();
               tls_task_group_nosignal = g;
           }
      } else {
          g =  c->choose_one_group();
      }
      g->ready_to_run_remote(bbw->tid, nosignal);
   ```
   
   可以考虑给get_task_group函数加个nosignal参数,把这段逻辑封装到里面



##########
src/bthread/butex.cpp:
##########
@@ -319,11 +330,13 @@ int butex_wake_all(void* arg) {
         return nwakeup;
     }
     // We will exchange with first waiter in the end.
-    ButexBthreadWaiter* next = static_cast<ButexBthreadWaiter*>(
-        bthread_waiters.head()->value());
-    next->RemoveFromList();
-    unsleep_if_necessary(next, get_global_timer_thread());
-    ++nwakeup;
+    ButexBthreadWaiter* next =
+        static_cast<ButexBthreadWaiter*>(bthread_waiters.head()->value());
+    if (!nosched) {
+        next->RemoveFromList();
+        unsleep_if_necessary(next, get_global_timer_thread());
+        ++nwakeup;
+    }
     TaskGroup* g = get_task_group(next->control);

Review Comment:
   get_task_group增加nosignal参数,参考上面评论



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r858259994


##########
src/bthread/countdown_event.cpp:
##########
@@ -50,7 +50,7 @@ void CountdownEvent::signal(int sig) {
         return;
     }
     LOG_IF(ERROR, prev < sig) << "Counter is over decreased";
-    butex_wake_all(saved_butex);
+    butex_wake_all(saved_butex, true);

Review Comment:
   嗯,这块需要修改



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] butex_wake_all support nosignal flag (brpc)

Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on PR #1751:
URL: https://github.com/apache/brpc/pull/1751#issuecomment-1862032909

   > 只能 no_signal 然后 bthread_flush,感觉不够优雅
   
   虽然不够优雅,但能解决问题吧,再加参数的话感觉这个接口也太复杂了。


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on a diff in pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on code in PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#discussion_r858275253


##########
src/bthread/butex.cpp:
##########
@@ -284,15 +286,19 @@ int butex_wake(void* arg, bool nosched) {
         if (!nosched) {
             TaskGroup::exchange(&g, bbw->tid);

Review Comment:
   exchange的时候会挂起原来的bthread,这里nosignal的含义是是否立即调度原来的bthread,可以给exchange加个参数。就像bthread_start_urgent也可以传nosignal。



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#issuecomment-1127144707

   > nosched参数是不是可以去掉了,如果nosignal是true,就不要调用exchange,而是调用ready_to_run 另外,我觉得exchange里面的nosignal=true会有问题,因为当前协程切出去了,再次回来需要一个flush,这个flush不知道谁去执行。这和其它地方的nosignal不一样,其它地方都是本协程唤醒其它协程,最后执行一次flush
   
   你的意思是只需要支持nosched=true && nosignal=true 和 nosched=false && nosignal=false这两种场景是吗?
   如果暂时没有nosched=true && nosignal=false和nosched=false && nosignal=true这两种场景的需求,也可以先去掉nosched参数。将来有需求再添加


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] yanglimingcn commented on pull request #1751: butex_wake_all support nosched flag

Posted by GitBox <gi...@apache.org>.
yanglimingcn commented on PR #1751:
URL: https://github.com/apache/incubator-brpc/pull/1751#issuecomment-1125856713

   已经按照你的建议修改了,这样代码清晰很多


-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org