Split the example into two threaded generator and consumer so that the queue does not get clogged up with generation. Still need to create the consumer+generator for dumping to logfile the result
this is probably terrible code