Make calls to flush queue and flush work asynchronous wrt to the main work loops.