穿线 [英] Threading

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

问题描述

我需要更多信息来阅读Visual Basic中的线程。


希望线性的东西没有太多链接迷失。我一直在

to
http://msdn.microsoft.com/library/de...nThreading.asp

但是太混乱了。我找不到任何对STA线程的引用

模型或者究竟是做什么的:


< STAThread()> Public Shared Sub Main(ByVal CmdArgs()As String)

Application.Run(New Form1)

End Sub


谢谢

I need more information to read about threading in Visual Basic.

Hopefully something linear w/o too many links to get lost in. I''ve been
to
http://msdn.microsoft.com/library/de...nThreading.asp
but it is too confusing. I can''t find any references to STA threading
model or what exactly this is doing:

<STAThread()> Public Shared Sub Main(ByVal CmdArgs() As String)
Application.Run(New Form1)
End Sub

Thanks

推荐答案

cj,


你确定需要线程,因为我从活跃的人那里读过这个

新闻组并且完全得到了我的认可,他写了一些东西。


多线程主要是由新手发现它们非常有趣

然而不知道用它来解决什么。


请注意多线程需要更长的处理时间。


因此,在需要的时候开始阅读它,除了更多的处理时间

使你的程序更难以维护。


但是如果你想读一些关于它的东西,而不是从版本2.0的

背景工作开始,它至少与

最后一个问题没什么关系。

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx


我希望这能给出一个想法。


Cor
cj,

Are you sure you need threading, as I have read from somebody active in this
newsgroup and full acknowledged by me, who wrote something as.

Multi threading is mostly in use by newbies who find it very interesting
however don''t know what to solve with it.

Be aware that multithreading takes forever more processing time.

Therefore start reading it when you need it, beside the more processing time
makes it your program less maintainable.

However if you want to read something about it, than start with the
backgroundworker from version 2.0 which has at least not to much from the
last problem.

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

I hope this gives an idea.

Cor


补充Cor的帖子....如果你''来自VB.Classic世界和

需要了解与VB.Classic'和COM'的线程相关的线程

模型,从这里开始:
http:// blogs .msdn.com / jfoscoding / arc ... 07 / 406341.aspx

然后
http://www.devx.com/DevX/10MinuteSolution/20365


我可以给你关于Application.Run做什么的罐头回复,但是这个

将提供更多信息:
http://dotnet.sys-con.com/re ad / 39039.htm


-

-C。 Moya
www.cmoya.com

" CJ" < cj@nospam.nospam>在消息中写道

新闻:em ************** @ TK2MSFTNGP12.phx.gbl ...
To complement Cor''s post.... If you''re coming from the VB.Classic world and
need to understand threading in relation to VB.Classic''s and COM''s threading
models, start here:
http://blogs.msdn.com/jfoscoding/arc...07/406341.aspx
Then
http://www.devx.com/DevX/10MinuteSolution/20365

I can give you a canned response about what Application.Run does, but this
will be more informative:
http://dotnet.sys-con.com/read/39039.htm

--
-C. Moya
www.cmoya.com
"cj" <cj@nospam.nospam> wrote in message
news:em**************@TK2MSFTNGP12.phx.gbl...
我需要更多信息在Visual Basic中阅读有关线程的内容。

希望线性的东西没有太多链接可以迷失。我已经
http://msdn.microsoft。 com / library / de ... nThreading.asp
但它太混乱了。我找不到任何关于STA线程模型的引用或者它到底在做什么:

< STAThread()> Public Shared Sub Main(ByVal CmdArgs()As String)
Application.Run(新Form1)
End Sub

谢谢
I need more information to read about threading in Visual Basic.

Hopefully something linear w/o too many links to get lost in. I''ve been
to
http://msdn.microsoft.com/library/de...nThreading.asp
but it is too confusing. I can''t find any references to STA threading
model or what exactly this is doing:

<STAThread()> Public Shared Sub Main(ByVal CmdArgs() As String)
Application.Run(New Form1)
End Sub

Thanks



Cor,除非我认为必须,否则我不会使用线程。我们从上面购买了com组件的
公司告诉我,我必须使用线程来使TCP / IP服务器能够处理许多请求

同时。对我来说也很合乎逻辑。我正在努力了解他们的示例程序。

Cor Ligthert [MVP]写道:
Cor, I would not be using threading unless I thought I had to. The
company we purchased the com components from has told me that I have to
use threading to make a TCP/IP server capable of handling many requests
simultaneously. Sounds logical to me too. I''m trying to understand
their sample programs.
Cor Ligthert [MVP] wrote:
cj,
新闻组中活跃的人那里读到的并且我完全认可的那样,他写了一些东西。

多线程主要由新手使用谁觉得它很有趣
然而不知道该用它来解决什么。

请注意多线程需要更长的处理时间。

因此开始阅读当你需要它时,除了更多的处理时间之外
使你的程序更难以维护。

然而,如果你想阅读一些关于它的东西,那么首先要从
背景工作开始。版本2.0至少与最后一个问题没什么关系。

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx
我希望这能给出一个想法。

Cor
cj,

Are you sure you need threading, as I have read from somebody active in this
newsgroup and full acknowledged by me, who wrote something as.

Multi threading is mostly in use by newbies who find it very interesting
however don''t know what to solve with it.

Be aware that multithreading takes forever more processing time.

Therefore start reading it when you need it, beside the more processing time
makes it your program less maintainable.

However if you want to read something about it, than start with the
backgroundworker from version 2.0 which has at least not to much from the
last problem.

http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

I hope this gives an idea.

Cor



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

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