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

Correct doc mistakes #54

Merged
merged 5 commits into from
Dec 16, 2023

Conversation

PhilippMDoerner
Copy link
Contributor

The doc comments implied that tryRecv and trySend do not block. That is incorrect.

They do not block waiting for data.
They do block trying to acquire the lock to the channel.

Also some adjustments for better uniformity in the docs:

  • Messages renamed to items
  • Some doc comments were made more similar to one another in text style

@ZoomRmc Tried to include the changes you suggested in #53

The doc comments implied that tryRecv and trySend do not block.
That is incorrect.

They do not block *waiting for data*.
They *do* block trying to acquire the lock to the channel.

Also some adjustments for better uniformity in the docs:
- Messages renamed to items
- Some doc comments were made more similar to one another in text style
Copy link
Contributor

@ZoomRmc ZoomRmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the total pruning the message term from the docs is for the good. This module implements the "message passing" synchronization primitive, people are surely looking for this.

threading/channels.nim Outdated Show resolved Hide resolved
threading/channels.nim Outdated Show resolved Hide resolved
threading/channels.nim Outdated Show resolved Hide resolved
threading/channels.nim Outdated Show resolved Hide resolved
threading/channels.nim Outdated Show resolved Hide resolved
@PhilippMDoerner
Copy link
Contributor Author

I'm not sure the total pruning the message term from the docs is for the good. This module implements the "message passing" synchronization primitive, people are surely looking for this.

Hmm fair, I think then I'd want to change all of "items" mentions to "message", the idea is just consistency. When I mention items I awaken the idea of what items is compared to messages and if they're the same, I'd want to avoid that, I'll fix it accordingly!

Includes @ZoomRc's suggestions from PR nim-lang#54 but
splits them up into smaller sentences to make them
more digestable.
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.
@Araq Araq merged commit 836ff67 into nim-lang:master Dec 16, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants