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

Add docs for Channel #7673

Merged
merged 16 commits into from
Jun 4, 2019
Merged

Add docs for Channel #7673

merged 16 commits into from
Jun 4, 2019

Conversation

j8r
Copy link
Contributor

@j8r j8r commented Apr 15, 2019

Fixes #5801

I'm not very familiar with channels and its concepts, this docs can be improved.

src/channel.cr Outdated Show resolved Hide resolved
@j8r j8r force-pushed the add-docs-for-channel branch from 6e81e9b to 3f082bd Compare April 15, 2019 14:23
src/channel.cr Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
Sija and others added 4 commits April 15, 2019 16:48
Co-Authored-By: j8r <mi@jrei.ch>
Co-Authored-By: j8r <mi@jrei.ch>
Co-Authored-By: j8r <mi@jrei.ch>
Co-Authored-By: j8r <mi@jrei.ch>
src/channel.cr Show resolved Hide resolved
src/channel.cr Show resolved Hide resolved
Sija and others added 2 commits April 15, 2019 16:55
Co-Authored-By: j8r <mi@jrei.ch>
Co-Authored-By: j8r <mi@jrei.ch>
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
Co-Authored-By: j8r <mi@jrei.ch>
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
src/channel.cr Outdated Show resolved Hide resolved
straight-shoota and others added 3 commits April 15, 2019 20:56
Co-Authored-By: j8r <mi@jrei.ch>
Co-Authored-By: j8r <mi@jrei.ch>
Co-Authored-By: j8r <mi@jrei.ch>
src/channel.cr Show resolved Hide resolved
Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

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

Can you add more actual documentation? For example what's a channel? What are they used for? What safety do they entail? What are Buffered and Unbuffered channels? What's their difference and strong/weak points? When will operations block —because even a buffered channel can block.

src/channel.cr Outdated Show resolved Hide resolved
src/fiber.cr Outdated Show resolved Hide resolved
@j8r
Copy link
Contributor Author

j8r commented Apr 16, 2019

@ysbaddaden I wish I could but I have not the experience to go into the details, and tell pros and cons of buffered vs unbuffered channels. Mine barely reach Channel(T).new, spawn, send and receive 😅
That's a reason why I opened this PR, I think it's important to do our best to document this major language feature.

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

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

I think, this is good enough for the start. @j8r do you plan to improve this in the future?

@j8r j8r changed the title Add docs for Channel Add docs for Channel May 31, 2019
@j8r
Copy link
Contributor Author

j8r commented May 31, 2019

@sdogruyol Maybe, I don't know when I would have enough experience/knowledge with Channels to further improve the documentation. I won't probably the best one for this task.

@straight-shoota straight-shoota added this to the 0.29.0 milestone Jun 3, 2019
@bcardiff bcardiff merged commit 2b8eef7 into crystal-lang:master Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No docs for Channel
8 participants