Skip to content

Commit

Permalink
#52 Made usage of articles consistent
Browse files Browse the repository at this point in the history
Used specific article "the" for sending messages as you know the mssage being sent.
Used unspecific article "a" for receiving a message as you do not know what you receive.
  • Loading branch information
PhilippMDoerner committed Dec 15, 2023
1 parent cf2a7f6 commit ae39037
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions threading/channels.nim
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ proc `=copy`*[T](dest: var Chan[T], src: Chan[T]) =
dest.d = src.d

proc trySend*[T](c: Chan[T], src: sink Isolated[T]): bool {.inline.} =
## Tries to send a message `src` to the channel `c`.
## Tries to send the message `src` to the channel `c`.
##
## The memory of `src` is moved, not copied.
## Doesn't block waiting for space in the channel to become available.
Expand All @@ -293,7 +293,7 @@ template trySend*[T](c: Chan[T], src: T): bool =
trySend(c, isolate(src))

proc tryRecv*[T](c: Chan[T], dst: var T): bool {.inline.} =
## Tries to receive an message from the channel `c` and fill `dst` with its value.
## Tries to receive a message from the channel `c` and fill `dst` with its value.
##
## Doesn't block waiting for messages in the channel to become available.
## Instead returns after an attempt to receive a message was made.
Expand All @@ -306,7 +306,7 @@ proc tryRecv*[T](c: Chan[T], dst: var T): bool {.inline.} =
channelReceive(c.d, dst.addr, sizeof(T), false)

proc send*[T](c: Chan[T], src: sink Isolated[T]) {.inline.} =
## Sends message `src` to the channel `c`.
## Sends the message `src` to the channel `c`.
## This blocks the sending thread until `src` was successfully sent.
##
## The memory of `src` is moved, not copied.
Expand Down

0 comments on commit ae39037

Please sign in to comment.