package main import ( simplejson "github.com/go-simplejson" ) var taskChan []chan *taskInfo var CHANNUM = 1024 type taskInfo struct { cointype string urlpath string resp *taskHandler jshandler *simplejson.Json } func initChanHandler(processNum int) { log.Debug("ininit taskChan") taskChan = make([]chan *taskInfo, processNum) for i := 0; i < processNum; i++ { taskChan[i] = make(chan *taskInfo, CHANNUM) } }