Add part of internal API of std.concurrent.channel