开发者

Will Reactive Extensions (Rx) supersede the Task Parallel Library?

After following through the samples of Rx.NET, I'm gob smacked at how brilliant the concept and implementation of Reactive Extensions are. It appears to offer developers a more maintainable pattern for achieving the same sort of multi-threaded parallel coding that .NET 4.0's task parallel library offers.

Will Rx.NET supersede TPL? Should it?开发者_StackOverflow社区


In short, no.

The Task Parallel Library (TPL) provides provides distribution of work (concurrency), as well as the concurrent optimisation of larger work (parallelism) while abstracting the actual mechanism of work distribution (threads).

C# adds the async keyword to help manage asynchrony from a language level. Rx has already been updated to support this feature.

Rx provides a framework to compose and manage asynchronous data streams using standard operators. While there is some crossover in Rx's use of schedulers, this is only an abstraction. In fact, the recommended scheduler for parallelism is the TaskScheduler, which uses the TPL.

See also Jeffrey van Gogh's response to the exact opposite question on the Rx forums.

Also, this question may be of use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜