Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semi-automatic cSpell pass to detect typos #54

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
(@ada2k, @dinosaure, #27)
- Protect an illegal access to the orphan from a possibly parallel task which
does not own the orphan value
(@poytypic, @dinosaure, #31, #32)
(@polytypic, @dinosaure, #31, #32)
- Be able to pin a specific domain when we want to launch a parallel task
(@dinosaure, #34)
- Expose the `Miou.Backoff` module which can be useful for users
(@dinosaure, #35)
- Fix or improve (from the maintainance point-of-view) the `Miou.Queue` module
- Fix or improve (from the maintenance point-of-view) the `Miou.Queue` module
and some internal parts of Miou about the usage of atomics
(@dinosaure, @polytypic, #36, #33)
- Prefer to require a `finaliser` function for the `events` value and actually
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ let () = Miou.run @@ fun () ->
let p0 = Miou.async @@ fun () -> 42 in
let p1 = Miou.async @@ fun () -> Miou.await_exn p0 in
Miou.await_exn p1
Esxception: Miou.Not_a_child
Exception: Miou.Not_a_child
```

This rule dictates that passing values from one task to another requires
Expand Down Expand Up @@ -139,7 +139,7 @@ let prgm () =
let rec until_its n =
match prgm () with
| Ok n' when n = n' -> ()
| _ -> untils_its n
| _ -> until_its n

let () =
until_its 1;
Expand Down Expand Up @@ -195,7 +195,7 @@ system resources through the API it can offer).
I/O and the resources of a system. Mutexes, conditions or semaphores can also
suspend the execution of a program. Our documentation and tutorials explain
those cases that we consider *marginal* in the interest of internalizing
suspension mecanism rather than exporting it to the user (but which are equally
suspension mechanism rather than exporting it to the user (but which are equally
important in the design of an application).

## Genesis
Expand Down
6 changes: 3 additions & 3 deletions book/src/conditions_and_mutexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ let server () =
let client, sockaddr = Miou_unix.Ownership.accept socket in
Format.printf "new client: %a\n%!" pp_sockaddr sockaddr;
ignore (Miou.async
~give:[ Miou_unix.Ownership.resource clientr
~give:[ Miou_unix.Ownership.resource client ]
~orphans (fun () -> echo client))
done;
Miou_unix.Ownership.close socket
Expand Down Expand Up @@ -154,11 +154,11 @@ new connection.

If we try this code, it may not work, and Miou might complain with the
`Not_owner` exception. This is because our `accept` task does not own the
file-descritptor; we need to pass it the resource via the `give` parameter.
file-descriptor; we need to pass it the resource via the `give` parameter.

It's worth noting that this ownership is exclusive. Once we've performed
`Miou_unix.Ownership.accept`, we need to:
1) transfer the file-descritptor back to the parent (so it can transfer it to
1) transfer the file-descriptor back to the parent (so it can transfer it to
the next `accept`).
2) transfer the new file-descriptor to the parent that was created in our
`accept` task so that it can transfer it to our `echo` task.
Expand Down
2 changes: 1 addition & 1 deletion lib/miou.ml
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ module Domain = struct
add_into_domain domain (Domain_task (prm, state))
| false ->
(* In that case, we must propagate the cancellation if [prm.state] has
ended abnormally. We try to attach tghe trigger to the compuatation
ended abnormally. We try to attach the trigger to the computation
[prm.state]. Two situations are possible:
- if we can attach the trigger, this means that the promise has not
yet been cancelled/resolved. However, between attachment and
Expand Down
12 changes: 6 additions & 6 deletions lib/miou.mli
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
Miou.both prm0 prm1

(* [my_long_computation] should have multiple cooperative points to let
the other task (our [server]) to accept incoming TCP/IP connexions. *)
the other task (our [server]) to accept incoming TCP/IP connections. *)
]}

In other words, your application is "more" available to handle events than
Expand Down Expand Up @@ -962,7 +962,7 @@ val cancel : 'a t -> unit

val yield : unit -> unit
(** [yield ()] reschedules tasks and give an opportunity to carry out the tasks
that have been on hold the longest. For intance:
that have been on hold the longest. For instance:

{[
# Miou.run @@ fun () ->
Expand Down Expand Up @@ -1064,7 +1064,7 @@ end

Finally, Miou informs the monitor of any points that have been cancelled, so
that the associated events can no longer be monitored (this could involve
cleaning up the table of active file-descritpors).
cleaning up the table of active file-descriptors).

{3 Tutorial.}

Expand Down Expand Up @@ -1128,7 +1128,7 @@ val sys_signal : int -> Sys.signal_behavior -> Sys.signal_behavior
- [Signal_handle fn] calls [fn] (in the [dom0])

[signal] is provided to be able to execute Miou's tasks when we receive a
signal from the system. The [dom0] takes the responsability to execute the
signal from the system. The [dom0] takes the responsibility to execute the
given [fn]. *)

val protect :
Expand Down Expand Up @@ -1252,6 +1252,6 @@ module Lazy : sig
been forced the computation is skipped and stored result is reproduced.

@raise Undefined
in case the suspension is currently being forced by the current
prommise. *)
in case the suspension is currently being forced by the current promise.
*)
end
2 changes: 1 addition & 1 deletion lib/miou_sync.mli
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Trigger : sig
(** [create ()] allocates a new trigger in the initial state. *)

val is_initial : t -> bool
(** [is_initial t] dtermines whether the trigger [t] is in the initial state.
(** [is_initial t] determines whether the trigger [t] is in the initial state.
*)

val is_signaled : t -> bool
Expand Down
2 changes: 1 addition & 1 deletion lib/miou_unix.mli
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ val bind_and_listen :

val accept : ?cloexec:bool -> file_descr -> file_descr * Unix.sockaddr
(** [accept ?cloexec fd] is a Miou friendly {!Unix.accept} which returns file
descritptors in non-blocking mode. *)
descriptors in non-blocking mode. *)

val connect : file_descr -> Unix.sockaddr -> unit
(** [connect fd sockaddr] is a Miou friendly {!val:Unix.connect}. The function
Expand Down
2 changes: 1 addition & 1 deletion lib/miou_vector.mli
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ val get: 'a t -> int -> 'a
ensures x = a.view[i] *)

val set: 'a t -> int -> 'a -> unit
(** [set a n x] modifies aector [a] in place, replacing
(** [set a n x] modifies vector [a] in place, replacing
element number [n] with [x].

Raise [Invalid_argument "Vector.set"]
Expand Down
8 changes: 4 additions & 4 deletions lib/scheduler.mld
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This short tutorial shows you how to create a simple scheduler in OCaml with
effects. We'd like to warn the reader that certain choices have been made to
suit our purposes: in other words, as opposed to Tatcher, there {b are}
suit our purposes: in other words, as opposed to Thatcher, there {b are}
alternatives in implementing a scheduler. This tutorial is not {i absolutist} in
what it explains.

Expand Down Expand Up @@ -193,7 +193,7 @@ We still need to define a few last elements for our scheduler so that the user
can interact with it:
- of course, there's the effect that will create a task
- but also a promise as a {i witness} to the task's progress
- from this promise, we can have a last interation, awaiting task completion
- from this promise, we can have a last interaction, awaiting task completion

Finally, a last type allows us to manipulate tasks independently of the type of
their results.
Expand Down Expand Up @@ -276,8 +276,8 @@ consisting of 3 functions:
+ our effects installer

{[
let spawn fn = Effet.perform (Spawn fn)
let await prm = Effet.perform (Await prm)
let spawn fn = Effect.perform (Spawn fn)
let await prm = Effect.perform (Await prm)

let my_function =
let prm = spawn @@ fun () -> print_endline "Hello" in
Expand Down