Simpler implementation of sample, without using a BlockingQueue