且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用C#在.net Compact Framework中使用线程池类?

更新时间:2023-11-13 17:39:52

我不确定我是否理解此问题. 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.