File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ import cats.effect.std.Console
649649import cats .syntax .all ._
650650import collection .immutable .Queue
651651
652- def consumer [F [_] : Sync : Console ](queueR : Ref [F , Queue [Int ]]): F [Unit ] =
652+ def consumer [F [_]: Sync : Console ](queueR : Ref [F , Queue [Int ]]): F [Unit ] =
653653 for {
654654 iO <- queueR.modify{ queue =>
655655 queue.dequeueOption.fold((queue, Option .empty[Int ])){case (i,queue) => (queue, Option (i))}
@@ -697,7 +697,7 @@ The full implementation of this naive producer consumer is available
697697
698698Our ` run ` function instantiates the shared queue wrapped in a ` Ref ` and boots
699699the producer and consumer in parallel. To do to it uses ` parMapN ` , that creates
700- and runs the fibers that will run the ` IO ` s passed as paremeter . Then it takes
700+ and runs the fibers that will run the ` IO ` s passed as parameter . Then it takes
701701the output of each fiber and and applies a given function to them. In our case
702702both producer and consumer shall run forever until user presses CTRL-C which
703703will trigger a cancelation.
You can’t perform that action at this time.
0 commit comments