diff --git a/site/src/guide.md b/site/src/guide.md index 69ccd3fc1b..5ba91fd0fe 100644 --- a/site/src/guide.md +++ b/site/src/guide.md @@ -517,7 +517,7 @@ trait CSVHandle { def rows[F[_]](h: CSVHandle)(implicit F: Effect[F], ec: ExecutionContext): Stream[F,Row] = for { q <- Stream.eval(async.unboundedQueue[F,Either[Throwable,Row]]) - _ <- Stream.suspend { h.withRows { e => async.unsafeRunAsync(q.enqueue1(e))(_ => IO.unit) }; Stream.emit(()) } + _ <- Stream.eval { F.delay(h.withRows(e => async.unsafeRunAsync(q.enqueue1(e))(_ => IO.unit))) } row <- q.dequeue.rethrow } yield row ```