Core Java® Volume I–Fundamentals


Chapter 14: Concurrency



Download 37,53 Mb.
Pdf ko'rish
bet15/34
Sana06.01.2022
Hajmi37,53 Mb.
#325163
1   ...   11   12   13   14   15   16   17   18   ...   34
Bog'liq
9780134177373-Vol-1

839

Chapter 14: Concurrency ...........................................................................

840


What Are Threads? ..................................................................................

14.1


846

Using Threads to Give Other Tasks a Chance .......................

14.1.1

851


Interrupting Threads ...............................................................................

14.2


855

Thread States .............................................................................................

14.3

855


New Threads ..............................................................................

14.3.1


855

Runnable Threads ......................................................................

14.3.2

856


Blocked and Waiting Threads ..................................................

14.3.3


857

Terminated Threads ..................................................................

14.3.4

858


Thread Properties .....................................................................................

14.4


858

Thread Priorities ........................................................................

14.4.1

Contents


xvi

From the Library of Hristo Dimov Hristov




ptg18360597

859


Daemon Threads ........................................................................

14.4.2


860

Handlers for Uncaught Exceptions ........................................

14.4.3

862


Synchronization .......................................................................................

14.5


862

An Example of a Race Condition ............................................

14.5.1

866


The Race Condition Explained ................................................

14.5.2


868

Lock Objects ...............................................................................

14.5.3

872


Condition Objects ......................................................................

14.5.4


878

The 


synchronized

 Keyword ............................................................

14.5.5

882


Synchronized Blocks .................................................................

14.5.6


884

The Monitor Concept ................................................................

14.5.7

885


Volatile Fields .............................................................................

14.5.8


886

Final Variables ............................................................................

14.5.9

886


Atomics .......................................................................................

14.5.10


889

Deadlocks ...................................................................................

14.5.11

892


Thread-Local Variables .............................................................

14.5.12


893

Lock Testing and Timeouts ......................................................

14.5.13

895


Read/Write Locks .....................................................................

14.5.14


896

Why the 


stop

 and 


suspend

 Methods Are Deprecated ...............

14.5.15

898


Blocking Queues ......................................................................................

14.6


905

Thread-Safe Collections ..........................................................................

14.7

905


Efficient Maps, Sets, and Queues ............................................

14.7.1


907

Atomic Update of Map Entries ................................................

14.7.2

909


Bulk Operations on Concurrent Hash Maps .........................

14.7.3


912

Concurrent Set Views ...............................................................

14.7.4

912


Copy on Write Arrays ...............................................................

14.7.5


912

Parallel Array Algorithms ........................................................

14.7.6

914


Older Thread-Safe Collections .................................................

14.7.7


915

Callables and Futures ..............................................................................

14.8

920


Executors ...................................................................................................

14.9


921

Thread Pools ...............................................................................

14.9.1

926


Scheduled Execution .................................................................

14.9.2


927

Controlling Groups of Tasks ....................................................

14.9.3

928


The Fork-Join Framework ........................................................

14.9.4


931

Completable Futures .................................................................

14.9.5

934


Synchronizers ...........................................................................................

14.10


xvii

Contents


From the Library of Hristo Dimov Hristov


ptg18360597

935


Semaphores ................................................................................

14.10.1


936

Countdown Latches ..................................................................

14.10.2

936


Barriers ........................................................................................

14.10.3


937

Exchangers .................................................................................

14.10.4

937


Synchronous Queues ................................................................

14.10.5


937

Threads and Swing ..................................................................................

14.11

939


Running Time-Consuming Tasks ............................................

14.11.1


943

Using the Swing Worker ..........................................................

14.11.2

951


The Single-Thread Rule ............................................................

14.11.3



Download 37,53 Mb.

Do'stlaringiz bilan baham:
1   ...   11   12   13   14   15   16   17   18   ...   34




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