Reading Material on Async Programming Practices [closed]

怎甘沉沦 提交于 2020-01-09 19:40:29

问题


Asynchronous programming is the next up-and-coming paradigm... or so it seems. I have been programming in Node.js for the past few months and have been learning to write code this way. I have a coworker who works in Silverlight and I have been trying to teach him how to use the TPL. I have also been showing him the "await" keyword and how it works.

After a while, using callbacks becomes pretty normal. In Node.js, I am using the caolan/async project to avoid deeply nested callbacks. I have taken a peek at the source code, but it is like reading the STL for the very first time.

Even though I have learned a lot of techniques that work in this environment, I worry I am missing others. I was curious if there were any reading materials/videos that explained async programming techniques and how to build an async library like the TPL or caolan/async.

Just trying to master the paradigm before it's everywhere.


回答1:


Well even though I know most of Async source code and how does it work, but I still use async mostly. So don't worry about that, you don't need to know exactly how it works. But as of learning, well I suggest you to read these articles:

  • http://book.mixu.net/node/ch7.html
  • http://stella.laurenzo.org/2011/03/bulletproof-node-js-coding/
  • http://howtonode.org/promises
  • http://web.archive.org/web/20120111150910/http://nodebits.org/distilled-patterns?
  • http://raynos.github.com/presentation/shower/controlflow.htm (from Raynos comment)

These are the best things that I've seen on the net explaining async control flow at without any abstractions.



来源:https://stackoverflow.com/questions/9355240/reading-material-on-async-programming-practices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!