Samples from the PragProg book Seven Concurrency Models in Seven Weeks: When Threads Unravel.