On 14 September 2010 09:57, Mathieu Lonjaret <mathieu.lonja...@gmail.com> wrote: > for(;;){ > n = alt(a); > if(n < 0) > error("with alt"); > > if (m[0] == 0){ > // a caller has terminated > dosomestuff()
shouldn't you nil out the appropriate part of the alt array here? i.e. a[n].c = nil otherwise you'll be alting on a freed chan which must be bad.