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

doc: an example doesn't work #15

Open
iliakan opened this issue Jun 17, 2015 · 0 comments
Open

doc: an example doesn't work #15

iliakan opened this issue Jun 17, 2015 · 0 comments

Comments

@iliakan
Copy link

iliakan commented Jun 17, 2015

While reading the doc at https://github.com/brentburg/chan#sending-values-to-the-channel, it appears that this code should execute the callback:

ch('foo')(function (err) {
  if (err) {
    // There was an error putting the value on the channel
  } else {
    // The value was successfully put on the channel
  }
})

In fact, it doesn't execute the callback (when ch = makeChan()).
Did you mean a buffered channel here?

P.S. Or maybe add a "yield ch" block that would make it work?

Your channels are co-compatible unlike js-csp, that's cool.

@iliakan iliakan changed the title doc: doesn't work doc: an example doesn't work Jun 17, 2015
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

No branches or pull requests

1 participant