简体   繁体   English

新的.net 4 多线程技术?

[英]new .net 4 multi-threading technique?

i sat in on part of a Microsoft PDC and heard the presenter talk about the cool new way that .net 4 and VS2010 allow for multi-threading.我坐在 Microsoft PDC 的一部分上,听到主持人谈论 .net 4 和 VS2010 允许多线程的酷炫新方式。 the code is smaller and cleaner and simpler, the logic is easier and it performs better with more control with regards to thread waiting, aborting and the such...代码更小、更干净、更简单,逻辑更简单,并且在线程等待、中止等方面具有更多控制,性能更好……

i have not yet used multi-threading in my apps and was looking to make a sample application that would lend itself to this and came up with a screen scraper that would take aa URL and extract all the links/ urls on the page and follow them recursively all the while storing feedback of the url that is being acted on to a DB table or in memory list object.我还没有在我的应用程序中使用多线程,并且正在寻找一个适合此的示例应用程序,并提出了一个屏幕抓取工具,它将获取一个 URL 并提取页面上的所有链接/ URL 并关注它们一直递归地存储正在作用于数据库表或内存列表对象的 url 的反馈。

can anyone post a sample code spinet or url that explains the new features of multi threading using asp.net with C# please.任何人都可以发布一个示例代码spinet或url来解释使用asp.net和C#的多线程的新特性。

(any hints on how to go about the actual screen scraping would be nice also) (有关如何进行实际屏幕抓取的任何提示也很好)

Really you should check out Reed's site .真的,您应该查看Reed 的网站 He has a series of blogs explaining the topic.他有一系列博客来解释这个话题。

Eric Lippert has examples too as he talks about the differences between C# 4 and C# 5 in this regard here . Eric Lippert 也有一些例子,他在这里谈到了 C# 4 和 C# 5 在这方面区别。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM