add cluster

This commit is contained in:
zhouyuyan
2018-01-16 16:50:10 +08:00
parent 123bb7210f
commit 1d6f6a4a71
4 changed files with 103 additions and 69 deletions

View File

@@ -27,7 +27,7 @@ func NewDispatcher() *Dispatcher {
}
func (d *Dispatcher) dispatch() {
for i := 0; i < MessagePoolNum; i++ {
for i := 0; i < (MessagePoolNum + 2); i++ {
go func(idx int) {
for {
select {