高层多线程/并发抽象为.NET
我只是想知道,为什么不像斯卡拉,F#或Haskell中,基本NET框架(如提供C#或VB)似乎有更高级别的并发模式非常少的原生支持。
I just wondered why, unlike Scala, F# or Haskell, the basic .NET framework (as available in C# or VB) seems to have very little native support for higher level concurrency patterns.
有可用的基本机制 - 门锁,监控,线程池 - 可是
There are basic mechanisms available - locks, monitors, the thread pool - but what about
- Synchronized variables (
MVar
) - Synchronous channels
- Asynchronous channels (see Go or Haskell)
- Actors / message passing (Erlang-Style)
- Futures
- Parallel computations/List functions
- Composable asynchronous computations through Linq (like F#'s
async {}
)
甚至软件事务内存( STM Haskell的)
和甚至采取ParallelFX的账户,这个名单只是部分覆盖。
And even taken account of ParallelFX, this list is only partially covered.
是否有一定的打击提供这样的功能(而是希望人们摆弄的IAsyncResult
的),更深层次的原因或者是这个计划被集成在未来?
Are there certain deeper reasons against providing such functionalities (and instead wanting people to mess around with IAsyncResult
's) or is this planned to be integrated in future?
有积极的和正在进行的研究,可用于启用并发软件,而无需掌握细枝末节B / C最Dev的或者做的不是最好的,最有效的抽象有时间或意愿去发展他们的技能,这一水平。
There's active and ongoing research into the best and most effective abstractions that can be used to enable concurrent software without mastering the minutiae b/c most dev's either don't have the time or inclination to develop their skills to that level.
鉴于此,首创置业拥有相当高的障碍,以新的观念进入,但是,这并不意味着他们没有发生。最近,在.NET 4中,将会有引进任务并行库。早期版本的第三方物流的实际包括未来< T>
是已被取代由新 A HREF =http://msdn.microsoft.com/en-us/library/dd449174%28VS.100%29.aspx>抽象的。
Given this, the BCL has a fairly high barrier to entry for new concepts, but that doesn't mean that they aren't happening. Most recently, in .Net 4, there will be the introduction of the Task Parallel Library. Earlier versions of the TPL actually included a Future<T>
type that has since been supplanted by newer abstractions.
还有积极研究通过研究语言阿克苏姆的通道/等的舞台上怎么回事。
There's also active research going on in the arena of channels/etc via the research language Axum.
我显然不是球队的一部分,我不为微软工作,但我的理解是,有一个在此领域超越什么是已被广泛采用的创新欲望。
I'm obviously not part of the team and I don't work for Microsoft, but my understanding is that there's a desire to innovate in this area beyond what's already widely available.