vb.net中线程怎么使用_VB.NET中的线程介绍

vb.net中线程怎么使用

To understand threading in VB.NET, it helps to understand some of the foundation concepts. First up is that threading is something that happens because the operating system supports it. Microsoft Windows is a pre-emptive multitasking operating system. A part of Windows called the task scheduler parcels out processor time to all the running programs. These small chunks of processor time are called time slices. Programs aren't in charge of how much processor time they get, the task scheduler is. Because these time slices are so small, you get the illusion that the computer is doing several things at once.

要了解VB.NET中的线程,它有助于了解一些基础概念。 首先是线程是会发生的事情,因为操作系统支持它。 Microsoft Windows是抢先式多任务操作系统。 Windows的一部分称为任务计划程序,将处理器时间分配给所有正在运行的程序。 这些小的处理器时间块称为时间片。 程序不负责获得多少处理器时间,任务调度程序负责。 由于这些时间片非常小,您会感到计算机正在一次执行多项操作。

线程的定义 ( Definition of Thread )

A thread is a single sequential flow of control.

线程是控制的单个顺序流。

Some qualifiers:

一些预选赛:

  • A thread is a "path of execution" through that body of code.

    线程是通过那段代码的“执行路径”。
  • Threads share memory so they have to cooperate to produce the correct result.

    线程共享内存,因此它们必须合作以产生正确的结果。
  • A thread has thread-specific data such as registers, a stack pointer, and a program counter.

    线程具有特定于线程的数据,例如寄存器,堆栈指针和程序计数器。
  • A process is a single body of code that can have many threads, but it has at least one and it has a single context (address space).

    进程是可以包含多个线程的单个代码主体,但是它至少具有一个线程,并且具有单个上下文(地址空间)。

This is assembly level stuff, but that's what you get into when you start thinking about threads.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值