Skip to content

doc: an example doesn't work #15

@iliakan

Description

@iliakan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions