This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy



Download 21,46 Mb.
Pdf ko'rish
bet1084/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1080   1081   1082   1083   1084   1085   1086   1087   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition



Note

The View 



Select Columns menu option of the Windows Task Manager allows you to select which

columns (PID, User Name, etc.) you wish to have displayed.

561

C H A P T E R   1 7

8849CH17.qxd  10/9/07  4:29 PM  Page 561



Figure 17-1.

The Windows Task Manager

An Overview of Threads

Every Win32 process has exactly one main “thread” that functions as the entry point for the

application. The next chapter examines how to create threads under the .NET platform using the

System.Threading namespace; however, to facilitate the topics presented here, we need a few work-

ing definitions. First of all, a 

thread is a path of execution within a process. Formally speaking, the

first thread created by a process’s entry point is termed the 



primary thread. Win32 API GUI desktop

applications define the WinMain() method as the application’s entry point. On the other hand, a

console-based program provides the Main() method for the same purpose.

Processes that contain a single primary thread of execution are intrinsically 



thread safe, given

the fact that there is only one thread that can access the data in the application at a given time.

However, a single-threaded process (especially one that is GUI-based) will often appear a bit unre-

sponsive to the user if this single thread is performing a complex operation (such as printing out a

lengthy text file, performing a mathematically intensive calculation, or attempting to connect to a

remote server located thousands of miles away).

Given this potential drawback of single-threaded applications, the Win32 API (as well as the

.NET platform) makes it possible for the primary thread to spawn additional secondary threads

(also termed 

worker threads) using a handful of Win32 API functions such as CreateThread(). Each

thread (primary or secondary) becomes a unique path of execution in the process and has concur-

rent access to all shared points of data.

As you may have guessed, developers typically create additional threads to help improve the

program’s overall responsiveness. Multithreaded processes provide the illusion that numerous

activities are happening at more or less the same time. For example, an application may spawn a

worker thread to perform a labor-intensive unit of work (again, such as printing a large text file).

C H A P T E R   1 7  




Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1080   1081   1082   1083   1084   1085   1086   1087   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish