简体   繁体   中英

F# Async workflow

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 outside 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM