线程池或多线程. [英] Thread Pool or Multi Threading.

查看:76
本文介绍了线程池或多线程.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其中有一个代理网站列表.
我已经完成了httpwebrequest的事情.
我让它运行,但事实是.我想使其更快一点. 2-5个线程会进行更多下载,并且它会像网站列表一样被分配给每个线程,然后在扫描后对其进行扫描.模式是否匹配.他们会将其保存到数组+列表框..

有人可以帮我吗?
我真的是线程池和多线程方法的愚蠢术语=/

基本上,我有一个任务清单,例如

列表上有一个很大的列表,例如100个不同的网站.我希望每个用户都可以选择访问它们并选择要运行多少线程.

如何将每个站点分配到线程或线程池?并在有错误,错误或完成的任务时跳过?


有人可以帮助我吗?

I got a Project where there''s a list of proxy websites.
I am already done on the httpwebrequest thing.
i got it running but the thing is. I wanted to make it a little bit faster like. 2-5 threads more downloading and its like a list of websites will be given to each thread then scan it, after scanning it. if patterns matched. they will save it to an array + listbox..

can anyone help me with this one?
i''m really dumb interms of thread pools and multi thread methods =/

basically, I have a list of task to do like for example

There''s a big list like 100 different website on a list. I want them to be visited each with the option of the user how many threads to run..

how will I distribute each sites to a thread or threadpool? and skip if there''s an error or wrong or complete task?


can anyone help me?

推荐答案

在CodeProject上有一篇有趣的文章:^ ]
Therez an interesting article at CodeProject: Multithreading in .NET[^]


在CodeProject上有一篇有趣的文章: .NET中的多线程 [ ^ ]
Therez an interesting article at CodeProject: Multithreading in .NET[^]


我建​​议您先阅读以下电子书: http://www.albahari.com/threading/ [^ ]

如果您有任何具体问题,请再回来.祝你好运:)
I suggest you start by reading this ebook: http://www.albahari.com/threading/[^]

Please come back with any specific questions you have. Good luck :)


这篇关于线程池或多线程.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆