开发者

Parallel programming in .NET Framework 3.5 with c#

Is there any way to paralel programming in .NET 3.5? I have a problem with threads. I create many threads. But i need to control them. I mean if one thread takes more time from 5 seconds i need to abort it. When i use Thread.Abort() sometimes i get ThreadAbortException at logs. I开发者_如何学运维 don't want it. In .NET 4 there is TPL. TPL is a good solution for me. I made some tests and read a few books. It works perfectly. But if i upgrade to .NET 4 i need to test other web sites and this process will take much more time and i need a quick solution for now. I will upgrade to .NET 4 but this is a long term solution and a plan for me. For now i need a quick solution. Is there any way to parallel programming in .NET 3.5? I found Rx. Do you suggest Rx? Because it says it is not supported.

Rx : http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx


.NET 4 is a side-by-side upgrade. This means that you can run this particular website on .NET 4 using the Task Parallel Library and any other new features that you want to use, while any other sites/apps continue to run on .NET 3.5 unless you specifically upgrade them. It works fine - we have several websites running on .NET 2.0, 3.5 & 4.0 all on the same server and there are no problems whatsoever.


At teched there was a session by Bart, who's in the Reactive Extensions team. It's an extension for this purpose exactly.

The site shows a .Net 4.0 version as well, and they told us that as the project grows, it will be merged into the .Net framework later on. I'd use it!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜