Skip to content

Channels #49

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

Merged
merged 22 commits into from
Apr 7, 2014
Merged

Channels #49

merged 22 commits into from
Apr 7, 2014

Conversation

mighe
Copy link
Contributor

@mighe mighe commented Apr 7, 2014

First channel implementation is ready.
It uses a simple lock-based solution and the select semantic is similar to Go's and Ruby's IO.select.

There are a couple of useful generic classes:

  • RingBuffer a simple non-thread-safe ring buffer implementation
  • BlockingRingBuffer a blocking implementation based on the previous one
  • WaitableList a blocking list (maybe it should be called BlockingQueue 😰 ) - at the moment is only an internal class, not meant to be exposed, but it could be improved and published as a part of our public API

It has not been tested very much and lacks of documentation: I'm a but unsure if it should be merged today (to have it in 0.6.0-pre) or it's better wait a couple of days.

@jdantonio
Copy link
Member

It's OK with me if you want to merge it. Thread pools are my main motivation for a prerelease, since they are used by several other classes (especially Future). But we can include anything else that is "complete" enough for people to start experimenting with. I trust your judgement.

@mighe
Copy link
Contributor Author

mighe commented Apr 7, 2014

Ok, I think we could merge:

  • people can start to play with channels
  • channels can be a useful to implement mailboxes and actors

In next days I'll start writing doc

mighe added a commit that referenced this pull request Apr 7, 2014
First channel implementation
@mighe mighe merged commit 2336b6f into master Apr 7, 2014
@mighe mighe mentioned this pull request Apr 7, 2014
@mighe mighe deleted the channels branch April 10, 2014 12:06
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.

2 participants