You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/08/24 12:11:19 UTC

[GitHub] [servicecomb-kie] tianxiaoliang commented on a change in pull request #210: optimize performance

tianxiaoliang commented on a change in pull request #210:
URL: https://github.com/apache/servicecomb-kie/pull/210#discussion_r694790227



##########
File path: pkg/concurrency/semaphore.go
##########
@@ -0,0 +1,35 @@
+package concurrency
+
+import "math"
+
+const (
+	DefaultConcurrency = 500
+	MaxConcurrency     = math.MaxUint16
+)
+
+//Semaphore ctl the max concurrency
+type Semaphore struct {
+	tickets chan bool
+}
+
+//NewSemaphore accept concurrency number, not more than 65535
+func NewSemaphore(concurrency int) *Semaphore {

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: commits-unsubscribe@servicecomb.apache.org

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