线程问题 [英] Threads question

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

问题描述

我需要了解线程和线程。我目前有一个过程

,它从AS400中提取10到12,000条记录并格式化

数据,然后存储到SQL服务器中。这个过程只需要一个小时b / b $ b小时,我想要一个进度条或其他东西来表明它实际上是工作的b $ b $我想这可以用线程来完成。


有人可以给我链接一些关于线程的好的入门信息


如果它有所不同,我使用的是VB .Net。


谢谢,


布拉德

I need to learn about threads and threading. I currently have a process
that is pulling 10 to 12 thousand records from the AS400 and formatting the
data then storing into a SQL server. This process is taking just over one
hour and I would like a progress bar or something to show that it is
actually working and I guess this would be done using threads.

Can somebody give me a link to some good starter information on threads

If it makes a difference, I am using VB .Net.

Thanks,

Brad

推荐答案

保存自己很麻烦,在主程序中,在循环中,更新

你的进度条并调用Application.DoEvents()。

调用Application.DoEvents允许windows控件在

处理期间进行更新,你的表格可以最小化等等。

线程无法直接更新UI控件,主线程必须等待

终止应用程序时终止的其他线程等。


" Brad" < BA ****** @ ukcdogs.com>在消息中写道

新闻:例如************** @ tk2msftngp13.phx.gbl ...
To save yourself a lot of trouble, in the main program, in the loop, update
your progress bar and call Application.DoEvents().
Calling Application.DoEvents allow windows controls to be updated during the
processing, your form can be minimized, etc.
Threads can not update UI controls directly, the main thread has to wait for
other threads to terminate when terminating the app, etc.

"Brad" <ba******@ukcdogs.com> wrote in message
news:eg**************@tk2msftngp13.phx.gbl...
我需要了解一下线程和线程。我目前有一个过程
从AS400中提取10到12,000条记录并格式化
数据然后存储到SQL服务器中。这个过程只花了一个多小时,我想要一个进度条或其他东西来表明它实际上正在工作,我想这可以用线程来完成。

有人可以给我一些关于线程的一些好的入门信息的链接

如果它有所不同,我使用VB .Net。

谢谢,

Brad
I need to learn about threads and threading. I currently have a process
that is pulling 10 to 12 thousand records from the AS400 and formatting
the
data then storing into a SQL server. This process is taking just over one
hour and I would like a progress bar or something to show that it is
actually working and I guess this would be done using threads.

Can somebody give me a link to some good starter information on threads

If it makes a difference, I am using VB .Net.

Thanks,

Brad



为了省去很多麻烦,在主程序中,在循环中,更新

你的进度条并调用Application.DoEvents()。

调用Application.DoEvents允许在

处理期间更新windows控件,你的表单可以最小化等等。

线程无法直接更新UI控件,主线程必须等待

其他线程在终止应用程序时终止等等。

" Brad" < BA ****** @ ukcdogs.com>在消息中写道

新闻:例如************** @ tk2msftngp13.phx.gbl ...
To save yourself a lot of trouble, in the main program, in the loop, update
your progress bar and call Application.DoEvents().
Calling Application.DoEvents allow windows controls to be updated during the
processing, your form can be minimized, etc.
Threads can not update UI controls directly, the main thread has to wait for
other threads to terminate when terminating the app, etc.

"Brad" <ba******@ukcdogs.com> wrote in message
news:eg**************@tk2msftngp13.phx.gbl...
我需要了解一下线程和线程。我目前有一个过程
从AS400中提取10到12,000条记录并格式化
数据然后存储到SQL服务器中。这个过程只花了一个多小时,我想要一个进度条或其他东西来表明它实际上正在工作,我想这可以用线程来完成。

有人可以给我一些关于线程的一些好的入门信息的链接

如果它有所不同,我使用VB .Net。

谢谢,

Brad
I need to learn about threads and threading. I currently have a process
that is pulling 10 to 12 thousand records from the AS400 and formatting
the
data then storing into a SQL server. This process is taking just over one
hour and I would like a progress bar or something to show that it is
actually working and I guess this would be done using threads.

Can somebody give me a link to some good starter information on threads

If it makes a difference, I am using VB .Net.

Thanks,

Brad



Chris,


感谢您的建议。这正是我需要的,它正在工作

罚款。


布拉德

" Chris Botha" < chris_s_botha @ .AT.hotmail.com>在消息中写道

news:O
Chris,

Thanks for the advice. That is exactly what I needed and it is working
fine.

Brad
"Chris Botha" <chris_s_botha@.AT.hotmail.com> wrote in message
news:O


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

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