2 ms·
I don't think you've seen truly great async support, it's virtually indistinguishable from sync code. Sync: let file = File.Open("foo.txt") let data = fil
by fleitz 12y ago
I don't think you've seen truly great async support, it's virtually indistinguishable from sync code.
Sync:
let file = File.Open("foo.txt")
let data = file.Read(8192)
// Do some compute stuff with data
ASync:
let! file = File.OpenAsync("foo.txt")
let! data = file.ReadAsync(8192)
// Do some compute stuff with data
- zhong-j-yu 12y agowhile the syntax can be as simple as that, there is still a difference, and the programmer still needs to be very careful. what if you accidentally forget the `"!"`?
- fleitz 12y agoUmm... it doesn't compile because it's the wrong type... But yeah multithreading is easy.