123456789101112131415161718192021222324 |
- 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)
- }
- }
|