خرید بک لینک

Vote count: 0

I have the following code

let rec consume() : Async<unit> = async {
    .....
    listA 
    |> Seq.iter(fun i ->
        .....
        let listB : seq<...> option = 
            let c = getListB a b
            match c with 
            | Some d -> Seq.filter(....) |> Some
            | None -> None 

Now the function getListB is converted to retu async<Seq<B>> instead of Seq<B>. So the code was converted to the following. However, the getListB blocked the execution. How to rewrite it nonblocking? Simply convert the line to let! c = getListB a b won't work because the code is in an ier lambda.

let rec consume() : Async<unit> = async {
    .....
    listA 
    |> Seq.iter(fun i ->
        .....
        let listB : seq<...> option = 
            let c = getListB a b |> Async.RunSynchronously
            match c with 
            | Some d -> Seq.filter(....) |> Some
            | None -> None 

asked 12 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 28 تير 1395 ساعت: 22:54

صفحه بندی