Deffered or Ref (open to recs on which is generally the more correct fit, or if some other approach is better), but I'm not sure of the best way to write the code for processing the items from the queue. My initial thought was that something like Effect.whileLoop would be correct, but the predicate is not effectful and accepts no parameters.