func (x *Imp) Go(me uint) { // ego := fmon.New0(x.object, 1, x.f, TrueSp, x.host[me], x.port[me]) go ego.Go() // go fmon.New (x.object, 1, x.f, TrueSp, x.host[me], x.port[me]) // TODO for i := uint(0); i < x.n; i++ { x.mon[i].Go() } }
func New(host []string, port []uint, nb []uint, f FuncSpectrum, a Any) *Imp { // x := new(Imp) x.host, x.port, x.h = host, port, uint(len(host)) x.nb, x.n = nb, uint(len(nb)) x.mon = make([]*fmon.Imp, x.n) x.f = f x.object = Clone(a) for i := uint(0); i < x.n; i++ { x.mon[i] = fmon.New0(x.object, 1, NilSp, TrueSp, x.host[x.nb[i]], x.port[x.nb[i]]) } return x }