I'm a C # programmer, but I have a question about ASC workflows F #. Suppose I have the following class in the C # class library:
class file {IAsyncResult BeginReadAll (string filename, async callback callback, object state) {} string endReadAll (IAsyncResult result) {}}
I understand that in F # it is possible for me to create a function called ReadAllAsync, which I can call like this:
Async {let! And this will not block the calling thread, but it will release the thread in the pool and then return to the second thread when the operation is finished. I think I understand how this is using Async.Primitive in F #, but I have a question: can I call this ReadAllAsync function with the C # code? If so, how do I package the F # code in the class library to access C #?
Here's an article that really asks you:
However, you are finished using the mons syntax of C #. Since LINQ was designed for query, it seems a little strange. In addition, there is no support for attempting / catching or using the settlement.
You get "RedLSink" which you get from Async. The built-in pamphitiv is not going to have the same magic without the right monad syntax. Calling it is quite straightforward, but the real utility is capable of making it.
You might be better, using the C # style, unfortunately,
Comments
Post a Comment