taking the workload in main down a bit, adding flush to see why it's locking in thread_join