12-Multithreading and GUI Programming

嚜燕rinciples of Software Construction:

A Brief Introduction to

Multithreading and GUI Programming

Josh Bloch

Charlie Garrod

School of

Computer Science

15-214

1

Administrivia

?

?

?

?

Homework 4b due next Thursday

HW 3 feedback pushed this morning.

HW 4a feedback available later this week

Last day to register to vote is TODAY

15-214

2

Key concepts from Thursday#

? Class invariants must be maintained

每 Make defensive copies where required

? Immutable class have many advantages

? Testing is critical to software quality

每 When fixing bugs, write tests before code

每 Good tests have high power-to-weight ratio

15-214

3

Outline

? Multithreaded Programming basics

? GUI Programming

15-214

4

What is a thread?

? Short for thread of execution

? Multiple threads run in same program concurrently

? Threads share the same address space

每 Changes made by one thread may be read by others

? Multithreaded programming

每 Also known as shared-memory multiprocessing

15-214

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download