Previous | Next --- Slide 9 of 63
Back to Lecture Thumbnails
dyc

This example is not thread safe. In one possible race condition, it is possible for thread 1 to call get on an object, and shortly after thread 2 calls delete on the same object, but the get for thread 1 returns null because the delete was executed before the get by the system.