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

async/await support #54

Open
hiroshi-yamamoto-dublr opened this issue Jul 22, 2022 · 8 comments
Open

async/await support #54

hiroshi-yamamoto-dublr opened this issue Jul 22, 2022 · 8 comments

Comments

@hiroshi-yamamoto-dublr
Copy link

This library is exactly what I was looking for, but almost all the properties I need to calculate and set in my dataflow graph are calculated using async functions. It's a shame you have to break these functions into two pieces, "cutting the dependency graph", as shown in the docs. Why not accept both async functions / promises and synchronous functions? The DAG can be scheduled in the same way, topologically.

@curran
Copy link
Member

curran commented Jul 25, 2022

It's a great idea! If you can get it working, I would welcome a pull request that adds this feature.

@curran
Copy link
Member

curran commented Jul 25, 2022

You may also like https://github.com/observablehq/runtime which supports promises.

@hiroshi-yamamoto-dublr
Copy link
Author

Apologies but I went with another library already, and wouldn't have the bandwidth to go back and add this to topologica. I like what you built, however.

@curran
Copy link
Member

curran commented Jul 26, 2022

Oh nice! I'm curious, what library did you end up going with?

@lveillard
Copy link

Up! This would be an amazing feature

@curran
Copy link
Member

curran commented Jun 7, 2023

Thanks! I wonder what that would look like... The next step would be to come up with some failing test cases that outline the API we want to see.

@hiroshi-yamamoto-dublr
Copy link
Author

@curran I went with this one. It handles async code just fine, and schedules as many async work units as possible to be run concurrently in the current "wave" of change propagation.

https://github.com/lukehutch/tiny-reactive-dataflow

@curran
Copy link
Member

curran commented Jun 7, 2023

Oh wow very nice!

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

3 participants