The Artima Developer Community
Sponsored Link

Java Buzz Forum
Concurrency and list.getLast()

1 reply on 1 page. Most recent reply: Jun 6, 2006 9:01 AM by Joe McDaniel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Concurrency and list.getLast() Posted: Apr 19, 2006 4:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Concurrency and list.getLast()
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

Brian Goetz (Mr Concurrency) has finished Java Concurrency in Practice a book in which he has sweat blood and tears for sure.

If you mention anything to him right now he will immediately be able to tell you about the concurrency issues and how we have multicores now, and hence we will soon be screwed.

Someone was complaining about list.getLast() instead of list.get(list.size()-1)

Brian pointed out that this isn't about ease of use, but that (of course):

list.getLast() would be atomic, whereas list.get(list.size()-1) would not, and could throw NPE even for a nonempty list if a list element were removed by another thread at just the wrong time.

Um, I've got to stop doing that.

Congrats on JCiP Brian.

Read: Concurrency and list.getLast()


Joe McDaniel

Posts: 1
Nickname: jrmcdaniel
Registered: Jun, 2006

Re: Concurrency and list.getLast() Posted: Jun 6, 2006 9:01 AM
Reply to this message Reply
I had preordered the book on Bruce's recommendation. Just got it a week or so ago and it is superb. Very readable. You could almost forget the highlighter since almost everything would be yellow (green, whatever).

Flat View: This topic has 1 reply on 1 page
Topic: Flickr: Ian Previous Topic   Next Topic Topic: Eclipse Monkey 1.1.7

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use