It'd be nice to be able to receive (or send) multiple values at once from the channel, something like channel.receive(n). For the case when n elements are not available, there could be an overloaded version channel.receive(n, duration) and even channel.receive(n, shouldBlock); shouldBlock=false would immediately return a batch with fewer than n elements.
It'd be nice to be able to receive (or send) multiple values at once from the channel, something like
channel.receive(n). For the case whennelements are not available, there could be an overloaded versionchannel.receive(n, duration)and evenchannel.receive(n, shouldBlock);shouldBlock=falsewould immediately return a batch with fewer thannelements.