本文介绍了如何使用线程池类与C#(升C).NET精简框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找的多线程在C#.NET Compact Framework的解决方案。虽然线程池类是很好的解决方案,但有什么办法来同步他们像WaitHandle.WaitAll的紧凑框架?

i am looking for the solution for multi threading in c# .net compact framework. though threadpool class is good solution but is there any way to sync them like WaitHandle.WaitAll in compact framework?

推荐答案

我不知道我理解这个问题。该线程池的作品就像在桌面上。对于线程同步对象,你把所有从的System.Threading 命名空间。诚然,在CF省略一些可有可无有方法(如为WaitAll),但这些既可以围绕工作(连续多等待),你可以P / Invoke创建/等待的API,也可以使用的,里面有所有的完全实现同步的对象。

I'm not sure I understand the problem. The ThreadPool works just like on the desktop. For thread synchronization objects, you have all of the usual suspects from the System.Threading namespace. Admittedly, the CF omits a few nice-to-have methods (like WaitAll), but those can either be worked around (multiple waits in succession), you can P/Invoke the Create/Wait APIs or you can use the Smart Device Framework, which has all of the sync objects fully implemented.

这篇关于如何使用线程池类与C#(升C).NET精简框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 19:45