简体   繁体   English

如何获取工作线程以在主UI线程上执行回调?

[英]How can I get a worker thread to execute a callback on the main UI thread?

I want to execute a number of tasks in parallel, once complete I want to execute a callback on the main UI thread. 我想并行执行许多任务,一旦完成,我想在主UI线程上执行回调。 Is this possible? 这可能吗? If so, how? 如果是这样,怎么办?

Multiple threading is not yet currenly supported, Its still under consideration, but there is support for parallel execution using Async await (just like in C#). 目前尚不支持多线程,目前仍在考虑中,但仍支持使用Async await并行执行(就像在C#中一样)。

https://github.com/aspnet/Blazor/issues/139 https://github.com/aspnet/Blazor/issues/139

https://github.com/aspnet/Blazor/issues/140 https://github.com/aspnet/Blazor/issues/140

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用后台工作程序将参数(字符串)发送到UI线程? - How can I send arguments(string) to the UI thread with the Background Worker? 如何从Windows Phone的工作线程中的UI线程获取值? - How to get values from UI Thread in a worker thread in Windows Phone? 如何将此C#工作线程代码与主线程中的共享数据变量分离? - How can I decouple this C# worker thread code from the main thread for shared data variables? 如何在BHO中的异步httpwebrequest回调中访问ui线程 - How can I access the ui thread in an asynchronous httpwebrequest callback in a bho 无法获得ContinueWhenAll在UI线程中执行 - can't get ContinueWhenAll to execute in UI thread 如何在.net中除Main UI线程之外的其他线程上运行UI? - How can I run UI on a thread other than the Main UI thread in .net? 调试主线程时为什么工作线程不执行? - Why does a worker thread not execute when debugging the main thread? 如何删除单独的工作线程 function 并创建一个线程 - How can I remove seperate worker thread function and create a thread 在等待在同一个线程上执行之后如何获得延续? - How can I get the continuation after an await to execute on the same thread? 我们如何识别 winform 控件是由主线程还是工作线程访问,以编写 InvokeRequired 功能? - How can we identify whether the winform control is accessing by the main thread or the worker thread, to write the InvokeRequired functionality?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM