【问题标题】:AsyncSeq not printing to Console in InteractiveAsyncSeq 未在 Interactive 中打印到控制台
【发布时间】:2020-01-07 04:35:04
【问题描述】:

我定义了一个简单的记录类型

type RowSapPL = { CargoID: int; Currency: string; IsInternal: bool; Amount: decimal}

一切都很好,从 db 的角度来看也是如此(我在表中看到了预期的记录),但我无法在 Visual 中的 F# Interactive 的控制台中读取 action 的消息("*** Ok ... ")工作室。 我也尝试过使用AsyncSeq.iter 而不是AsyncSeq.iterAsyncaction 的同步版本。 我错过了什么?只有 "starting async seq""async seq ended" 以及 sql 日志记录(来自上面未显示的简单 SqlQueryEvent |> Event.add)从异步计算表达式中打印出来。

【问题讨论】:

    标签: asynchronous f# f#-interactive


    【解决方案1】:

    我必须在我的 asyncSeq 函数中使用 yield 而不是 return 来清空和插入表中的行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-27
      • 1970-01-01
      • 2016-09-21
      • 1970-01-01
      • 1970-01-01
      • 2016-10-27
      相关资源
      最近更新 更多