Hacker News new | past | comments | ask | show | jobs | submit login

An operation queue where dependencies can be set is also very relevant. For example, if you have to do 2 different json requests, followed by a render - but they are mutually exclusive, you can do a 2->1 dependency. If they do depend on each other's result, you can do a 1->1->1

I like this async syntax but I'm more fond of native JS generator trampoline. I think the JSOperation with dependencies could even use generators in its implementation.

All these solutions coming about after the C# async article are very enlightening to this problem of the synchronic vs diachronic vs asynchronic.

The JSOperations lib is in alpha but can be found here https://github.com/iandrewfuchs/JSOperations/blob/master/REA...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: