Skip to content

Commit

Permalink
Update concurrency.md to fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
ryepesg authored Jan 30, 2025
1 parent db33b42 commit d741bdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def slow(tx: Sender[String]): Unit \ {Chan, IO} =
def main(): Unit \ {Chan, NonDet, IO} = region rc {
let (tx, rx) = Channel.buffered(1);
spawn slow(tx) @ rc;
let timeout = Channel.timeout(rc, Time.Duration.fromSeconds(5));
let timeout = Channel.timeout(Time.Duration.fromSeconds(5));
select {
case m <- recv(rx) => m
case _ <- recv(timeout) => "timeout"
Expand Down

0 comments on commit d741bdf

Please sign in to comment.