loop :: Manager -> IO loop
loop mgr = go Q.empty
  where go s = runMgr (step mgr) s >>= go . snd

------------------------------------------------------------------------
-- Worker allocation
loop :: Manager -> IO loop
loop mgr = go Q.empty
  where go s = runMgr (step mgr) s >>= go . snd

------------------------------------------------------------------------
-- Worker allocation
loop mgr = go Q.empty
  where go s = runMgr (step mgr) s >>= go . snd

------------------------------------------------------------------------
-- Worker allocation