.net - In F#, can I have a function that is called on one thread, but returns on another? -


I want to be able to pass some functions to some other object pass and then want to come back to a different thread I am I know this means that the caller does not know that he has closed the threads, but I have to know that there is no way to return the function to any other thread.

Async workflow delivers something like this, for example

  async {printfn "on thread 1." Come on! R = stream.ReadAsync () printfn "Now on Thread 2" ... ...}  

But this is an illusion to just write, write, and make logic easier to read is ; Under the hood it is doing all normal async stuff with BeginRead / EndRead / callbacks / etc.


Comments