【问题标题】:Cordova + ngrx/effect fire and forget long running method freezes UICordova + ngrx/effect fire and forget long running 方法冻结 UI
【发布时间】:2019-06-28 02:58:39
【问题描述】:

在 Cordova 应用中,火和雾的效果是这样实现的:

@Effect({dispatch: false})
onFireAndForget$ = this.actions$
ofType(MyActionTypes.FireAndForget)
.pipe(
   tap(action => longRunningMethod(action.payload))
)

应用程序的 UI 冻结,直到“longRunningMethod”的执行完成。 有没有办法在单独的线程上执行长时间运行的方法而不影响其他应用程序进程?

【问题讨论】:

  • 这不应该发生。你有复制品吗?

标签: cordova asynchronous ngrx ngrx-effects fire-and-forget


【解决方案1】:

事实证明,这个问题既不在应用程序中,也不在实际实现中。 仅在设备上测试 Cordova 应用程序并在 PC 上使用 chrome 检查它时,才会体验到 UI 缓慢。正常运行应用程序没有问题。

【讨论】:

    猜你喜欢
    • 2014-05-16
    • 1970-01-01
    • 1970-01-01
    • 2011-02-07
    • 2013-01-13
    • 2021-10-12
    • 2017-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多