Is there a way to look at the definition of the Async workflow? What goes under the hood that would make a line of code behave differently in there, than out开发者_如何转开发side of it?
If by "the Async workflow", you mean the AsyncBuilder
type which defines the behavior of async
blocks, then you can find the definition in the control.fs file in the source distribution, in the source\fsharp\FSharp.Core folder.
The translation of a computation expression into method calls on the builder instance can be found in the F# spec.
Adding to kvb's advice, relevant Don's "Expert F#" chapter is available online:
http://download.microsoft.com/download/b/b/6/bb666ebe-e643-496f-b290-03527d157b47/Expert.F.Sharp_Ch13_8504Syme.pdf
It includes a short but informative "Under the Hood" section.
精彩评论