1 / 16
文档名称:

附录B旅行社服务质量暗访制度及评分.ppt

格式:ppt   大小:187KB   页数:16页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

附录B旅行社服务质量暗访制度及评分.ppt

上传人:endfrs 2018/3/20 文件大小:187 KB

下载得到文件列表

附录B旅行社服务质量暗访制度及评分.ppt

相关文档

文档介绍

文档介绍:
Graphics
1
Graphics & Graphical Programming
Lecture 18 - Introduction to Threads

Graphics
2
Intro to Threads- Outline
What is a Thread?
Uses in Timing or Animation in Games and Simulation
Many systems are in fact multi-threaded - you do not always see or need to be aware of the system threads working in the background
Java has several systems threads for the Garbage Collector and for the AWT graphics system
Using Java inbuilt thread facilities

Graphics
3
What is A Thread?
Normally we think of our program as being a single thread of control
The CPU architecture has:
A program (compiled code)
A program counter
Program context - ie memory allocated, values in registers
A multi-threaded program has a set of “virtual CPUs”
Each has its own thread of control, linked to a separate program counter
Threads generally share the program code and memory allocation of a single program (unlike eg full “processes”)

Graphics
4
Cooperating threads
Several threads running the same program can usefully cooperate to help the user achieve an e
eg managing the windows system or mouse and keyboard
Think of threads as a way of conceptualising or managing a concurrent or parallel program that can effectively “do” several things at once

Graphics
5
Using Threads
Needs careful planning in the general case
Need to consider what each thread will do…
How will they be initialised?
How will they exchange information (eg shared variables)
Threads libraries are available mon programming languages like C or C++
Java has a threads system integrated into the language
Thread object or Runnable interface

Graphics
6
Java Threads
The Java Virtual Machine (JVM has several system threads that help your program run
Garbage Collector thread wakes up periodically and recovers memory no longer used by unreferenced objects
AWT graphics thread looks after the various events that can occur ina program such as mouse of keyboard ev