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

alts does receive "null" from channels #8

Open
ThomasDeutsch opened this issue Nov 30, 2014 · 0 comments
Open

alts does receive "null" from channels #8

ThomasDeutsch opened this issue Nov 30, 2014 · 0 comments

Comments

@ThomasDeutsch
Copy link

A channel, created with csp.go(function*().... will not yield and always return null in csp.alts.

var t = csp.go(function*() {
    while(true) {
      var action = yield csp.take(csp.timeout(2000));
      return "test"
    };
});

A channel like "t" will not work with alts. alts will not wait for a new value from t - it will receive "null" immediatly and it will run a loop that freezes the browser.

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