Computer Science 225
Advanced Programming
Spring 2022, Siena College
Lecture 14: Dangers of Concurrency
Date: Monday, March 28, 2022
Agenda
- Announcements
- Problem Set 5 due tomorrow night, usual late policy applies
- Lab 7: Recursive Graphics and Graphics Objects (in Canvas and GitHub) -
finish up by the start of next week, see added info on the lab's
Canvas page
- Final Project - see the document for all details and deadlines
- Problem Set 6 intro
- Exam 2 information
- postponed until April 12 and/or 13, just before Easter break
- there will be a Google form to indicate availability for an evening slot
- all topics up next Monday's class, this week's lab, and Problem Set 6
- more details to come a week from today
- Keyboard listeners: we will not cover this in class, but see the
topic notes, example, and corresponding video if you'd like to use
this functionality
- Dangers of concurrency
Terminology
- keyboard focus
- interleaving of operations
- interference
- race condition
- process or thread synchronization
Examples
- ArrowBall: handling keyboard events, in this case arrow keys, in a graphics program
- ATMConcurrency: demonstration of race conditions and the synchronized keyword