Ejemplo n.º 1
0
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()
	}
}
Ejemplo n.º 2
0
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
}