【问题标题】:Issue trying to run ReduxSimple library on Uno Platform Wasm尝试在 Uno Platform Wasm 上运行 ReduxSimple 库时出现问题
【发布时间】:2021-07-22 12:36:54
【问题描述】:

有人可以帮我解决这个问题:

VM59:1 fail: Windows.UI.Core.CoreDispatcher[0]
      Dispatcher unhandled exception
System.PlatformNotSupportedException: Arg_PlatformNotSupported
   at System.Threading.Thread.Start(Object parameter) in D:\a\Uno.DotnetRuntime.WebAssembly\Uno.DotnetRuntime.WebAssembly\runtime\src\mono\System.Private.CoreLib\src\System\Threading\Thread.Browser.Mono.cs:line 17
   at System.Reactive.Concurrency.ConcurrencyAbstractionLayerImpl.StartThread(Action`1 action, Object state) in /_/Rx.NET/Source/src/System.Reactive/Concurrency/ConcurrencyAbstractionLayerImpl.cs:line 71
   at System.Reactive.Concurrency.DefaultScheduler.LongRunning.LongScheduledWorkItem`1[[System.Reactive.ObserveOnObserverLongRunning`1[[ReduxSimple.ActionDispatchedWithOrigin, ReduxSimple, Version=3.6.1.0, Culture=neutral, PublicKeyToken=null]], System.Reactive, Version=4.4.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263]]..ctor(ObserveOnObserverLongRunning`1 state, Action`2 action) in /_/Rx.NET/Source/src/System.Reactive/Concurrency/DefaultScheduler.cs:line 185
   at System.Reactive.Concurrency.DefaultScheduler.LongRunning.ScheduleLongRunning[ObserveOnObserverLongRunning`1](ObserveOnObserverLongRunning`1 state, Action`2 action) in /_/Rx.NET/Source/src/System.Reactive/Concurrency/DefaultScheduler.cs:line 204

【问题讨论】:

    标签: c# webassembly uno-platform


    【解决方案1】:

    您正在使用的Rx 方法正在尝试启动一个线程,WebAssembly 不支持该线程。 WebAssembly 目前只有 single-threaded。您需要重写您的代码,以便它不会尝试使用后台线程。使用platform-specific code 可能会很有趣。

    您可以跟踪 WebAssembly 中对多线程的支持,因为它与 this GitHub issue 中的 Uno 平台相关。

    【讨论】:

      猜你喜欢
      • 2020-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-22
      • 2015-02-24
      • 2020-06-28
      • 1970-01-01
      相关资源
      最近更新 更多