Commit e18ae1e2223f0067c151f10d3e68775f7f4839f7

Con Kolivas 2013-11-01T00:26:55

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