如何使用C#在.net Compact Framework中使用线程池类? [英] How to use threadpool class in .net compact framework with c#?

查看:43
本文介绍了如何使用C#在.net Compact Framework中使用线程池类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找c#.net紧凑框架中的多线程解决方案.虽然线程池类是一个很好的解决方案,但是在紧凑的框架中有什么方法可以像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?

推荐答案

我不确定我是否理解此问题. ThreadPool 的工作原理与在台式机上一样.对于线程同步对象,您具有系统中的所有常见问题.线程名称空间.诚然,CF省略了一些不错的方法(如WaitAll),但这些方法可以解决(连续多次等待),可以P/调用Create/Wait 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#在.net Compact Framework中使用线程池类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆