[concurrency-interest] Starting a Thread within a constructor, what can go wrong?

Alex Miller alexdmiller at yahoo.com
Sat Dec 11 00:03:52 EST 2010


I've got a couple examples of this in this presentation:

http://www.slideshare.net/alexmiller/java-concurrency-gotchas-3666977

on slides 39-40.  The cache background cleaner example on slide 40 is based on 
some actual bad code that I wrote that did sometimes throw NPEs when the 
background thread saw partially constructed class state.  I'm sure with some 
timing nudges or enough reps that you could coax it into regular failure.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20101210/bb822993/attachment.html>


More information about the Concurrency-interest mailing list