I haven't tried chanclose() yet, but setting to nil the freed chan in the alt entry is not really what I wanted since it will make alt() return -1 (better than crashing but not ideal). In any case I found a satisfying workaround in my algorithm to solve that: when a thread is done using a chan, I keep track of it instead of calling chanfree(), and instead of allocating a new chan/alt when creating a new thread, I simply reuse one of the previously "abandonned" ones (if any is available). And I'll just free them all when the program terminates. Thanks to all, Mathieu