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

DoN may cause unexpected sequence of execution when mixing sync and async code. #34

Open
metasansana opened this issue Aug 27, 2020 · 1 comment

Comments

@metasansana
Copy link
Contributor

Example:

doFuture(function *() {
  let x = syncFunction();
  let y = yield asyncFunction(x);
 return  monad(y);
})

The syncFunction will be executed as soon as the generator is created. One might expect it to be instead executed when the future is forked. We need to investigate this deeper to determine what constitutes correct behavior.

@metasansana
Copy link
Contributor Author

This may only be a problem because we tend to have side effects in there. For instance, syncFunction() modifying class properties etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant