高手赐教B/S模式多线程例子,谢谢

legu1 legu1 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
这是我的代码,但是感觉没有缩短时间,有没有办法让两个线程异步,该如何做
protected void Button3_Click(object sender, EventArgs e)
{
Thread thread2 = new Thread(new ThreadStart(bind2));
Thread thread1 = new Thread(new ThreadStart(bind1));
thread1.Start();
thread2.Start();
// thread.Join(TimeSpan.FromSeconds(100));
Thread.CurrentThread.Join(TimeSpan.FromSeconds(100));

thread2.Abort();
thread1.Abort();
}
protected void bind1()
{
string ids = this.txtID.Text.Trim(); //父类ID
string str = this.DropDownList2.SelectedValue.Trim();
if (str == "父级id值")
{
ids = this.txtID.Text.Trim();
}
else if (str == "class")
{
ids = "";
}
string xpath = this.txtXPath.Text.Trim();//抓取链接的xpath
string url = this.txtUrl.Text.Trim();//网站的url

string pagePath = "";
string s = getstr(url, ids, pagePath, xpath);//获取结果值
this.txtLianJie.Text += s;
}
protected void bind2()
{
string ids = this.txtID.Text.Trim(); //父类ID
string str = this.DropDownList2.SelectedValue.Trim();
if (str == "父级id值")
{
ids = this.txtID.Text.Trim();
}
else if (str == "class")
{
ids = "";
}
string xpath = this.txtXPath.Text.Trim();//抓取链接的xpath
string url = this.txtUrl.Text.Trim();//网站的url

string pagePath = "";
string s = getstr(url, ids, pagePath, xpath);//获取结果值
this.txtLianJie.Text += s;
}
...全文

相关推荐

C/S模式的例子

一个C/S模式的例子

chenxh

B/S模式与C/S模式的区别

当前网络软件千姿百态,不管哪种网络软件都有一定的模式,B/S和C/S模式的当前最为流行的两种模式,本文主要介绍了B/S与C/S相同点和不同点。

crsanzhi

B/S英文文献

这是一份关于B/S结构介绍的英文文献及其译文.B/S结构 B/S结构即Browser/Server(浏览器/服务器)结构,是伴随着互联网技术出现的一种对C/S结构的改变或者说是改进。在这种结构中,用户界面通过WWW来达到在前端充分实现部分逻辑的目的,但最主要的逻辑在服务器中实现,从而形成一个所谓的三层结构...... B/S structure that Browser/Server (browser / server) structure, with the emergence of Internet technology, a change or improvement to C/S structure. In this structure, user interface through WWW fully realized part of the logic in the front end to achieve, but the main logic in the server-to form a so-called 3-tier structure......

tkblack

C/S、B/S的区别及优缺点

一、 什么是C/S和B/S 第一、什么是C/S结构 C/S、B/S的区别及优缺点 第二、什么是B/S结构 二、C/S和B/S 之比较 (一)C/S 模式的优点和缺点   C/S 模式的优点   C/S 模式的缺点 (二)B/S模式的优点和缺点   B/S结构的优点   B/S 模式的缺点 (三)C/S、B/S结构软件比较 1、C/S架构软件的优势与劣势   (1)应用服务器运行数据负荷较轻。   (2)数据的储存管理功能较为透明。   (3)C/S架构的劣势是高昂的维护成本且投资大。   2、B/S架构软件的优势与劣势   (1)维护和升级方式简单。   (2)成本降低,选择更多。   (3)应用服务器运行数据负荷较重。 (四)C/S 与 B/S 区别   (1)硬件环境不同:   (2)对安全要求不同   (3)对程序架构不同   (4)软件重用不同   (5)系统维护不同   (6)处理问题不同   (7)用户接口不同   (8)信息流不同

zs0412

java学生成绩管理系统B/S+C/S

Java学生选课成绩管理系统,含有B/S模式和C/S模式,学生端使用B/S模式,教师端使用C/S模式,C/S使用swing,mysql数据库+tomcat,含有数据库,直接导入就行

vsjiumeilema
评论 17
收藏 已收藏
分享
返回顶部
legu1
.NET社区 62,275 成员 668,968 内容