那是c#可以实现未来线程模式的任何API吗? [英] Is that any API that c# can implement future pattern of threading?
本文介绍了那是c#可以实现未来线程模式的任何API吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
c#的任何API都可以实现未来的线程模式吗?
就像Java的未来任务和可调用接口一样.
Is that any API that c# can implement future pattern of threading?
like java''s future task and callable interface.
thanks.
推荐答案
如果您可以使用.Net 4,请查看System.Threading.Tasks [ IAsyncResult [ ^ ]类.界面略有不同,但基本功能相同.
If you have .Net 4 available to you then check out the System.Threading.Tasks[^] namespace. It contains some things look like what you''re asking for - particularly the Task class.
Prior to .Net 4 the closest that I know of would be the IAsyncResult[^] class. The interface is a bit different but it does basically the same thing.
这篇关于那是c#可以实现未来线程模式的任何API吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文