How to use threadpool class in .net compact framework with c#?

南楼画角 提交于 2019-12-11 11:12:09

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/1552813/how-to-use-threadpool-class-in-net-compact-framework-with-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!