Skip to content

Commit 5f3de91

Browse files
committed
fix typo
recieve -> receive
1 parent 58f9b95 commit 5f3de91

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ threshold, below which the computation can be done sequentially.
423423
## Bounded Channels
424424

425425
Channels act as medium to communicate data between domains. They can be shared
426-
between multiple sending and recieving domains. Channels in Multicore OCaml
426+
between multiple sending and receiving domains. Channels in Multicore OCaml
427427
come in two flavours:
428428

429429
* **Bounded**: buffered channels with a fixed size. A channel with buffer size
@@ -460,9 +460,9 @@ let _ =
460460
```
461461

462462
The above example would be essentially blocking indefinitely because the `send`
463-
does not have a corresponding recieve. If we instead create a bounded channel
463+
does not have a corresponding receive. If we instead create a bounded channel
464464
with buffer size n, it can store up to [n] objects in the channel without a
465-
corresponding recieve, exceeding which the sending would block. We can try it
465+
corresponding receive, exceeding which the sending would block. We can try it
466466
with the same example as above just by changing the buffer size to 1.
467467

468468
```ocaml
@@ -516,11 +516,11 @@ let recv c =
516516
let _ =
517517
let senders = Array.init num_domains
518518
(fun _ -> Domain.spawn(fun _ -> send c )) in
519-
let recievers = Array.init num_domains
519+
let receivers = Array.init num_domains
520520
(fun _ -> Domain.spawn(fun _ -> recv c)) in
521521
522522
Array.iter Domain.join senders;
523-
Array.iter Domain.join recievers
523+
Array.iter Domain.join receivers
524524
```
525525

526526
`(Domain.self () :> int)` returns the id of current domain.
@@ -575,8 +575,8 @@ We have created an unbounded channel `c` which will act as a store for all the
575575
tasks. We'll pay attention to two functions here: `create_work` and `worker`.
576576

577577
`create_work` takes an array of tasks and pushes all elements of tasks to the
578-
channel `c`. The `worker` function recieves tasks from the channel and executes
579-
a function f with the recieved task as parameter. It keeps recursing until it
578+
channel `c`. The `worker` function receives tasks from the channel and executes
579+
a function f with the received task as parameter. It keeps recursing until it
580580
encounters a Quit message, which is why we send `Quit` messages to the channel,
581581
indicating that the worker can terminate.
582582

code/chan/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121

2222
(executable
23-
(name senders_recievers)
24-
(modules senders_recievers)
23+
(name senders_receivers)
24+
(modules senders_receivers)
2525
(libraries domainslib))
2626

2727
(executable

code/chan/senders_recievers.ml renamed to code/chan/senders_receivers.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ let recv c =
1515
let _ =
1616
let senders = Array.init num_domains
1717
(fun _ -> Domain.spawn(fun _ -> send c )) in
18-
let recievers = Array.init num_domains
18+
let receivers = Array.init num_domains
1919
(fun _ -> Domain.spawn(fun _ -> recv c)) in
2020

2121
Array.iter Domain.join senders;
22-
Array.iter Domain.join recievers
22+
Array.iter Domain.join receivers

0 commit comments

Comments
 (0)