Correctly init/deinit cothreads