You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/08/13 18:40:45 UTC

[trafficserver] branch 8.0.x updated: fix the number of started threads of certain type.

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 9734b7c  fix the number of started threads of certain type.
9734b7c is described below

commit 9734b7cba283f55b742151eb171a771cbbc1ad67
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Fri Aug 10 00:46:30 2018 +0800

    fix the number of started threads of certain type.
    
    (cherry picked from commit 5642ab204d5ddc1145a0d567a3044eabee539e68)
---
 iocore/eventsystem/UnixEventProcessor.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc
index d2e86c7..af38b8a 100644
--- a/iocore/eventsystem/UnixEventProcessor.cc
+++ b/iocore/eventsystem/UnixEventProcessor.cc
@@ -394,8 +394,8 @@ EventProcessor::initThreadState(EThread *t)
 {
   // Run all thread type initialization continuations that match the event types for this thread.
   for (int i = 0; i < MAX_EVENT_TYPES; ++i) {
-    thread_group[i]._started++;
     if (t->is_event_type(i)) { // that event type done here, roll thread start events of that type.
+      ++thread_group[i]._started;
       // To avoid race conditions on the event in the spawn queue, create a local one to actually send.
       // Use the spawn queue event as a read only model.
       Event *nev = eventAllocator.alloc();