Jazoon 2011, Day 2 – Java Concurrent Animated – Victor Grazi

Java Concurrent Animated – Victor Grazi

One picture says more than a thousand words. Now imagine what an animation can say. Victor did several for us to better understand the classes in java.util.concurrent. You can find the software on sourceforge: javaconcurrenta

Here is an example:

Very nice. I know a lot about threads and concurrency (the Amiga had preemptive multitasking back in 1986) but even I was surprised by the ReentrantReadWriteLock example: If you have a writer waiting for the lock and another reader comes along, should it get the lock immediately or should it wait for the writer to complete?

My first instinct was to get all the (quick) readers out of the way but chances are that, when all readers have been processed, another one might have come along, effectively starving the writer.

Links:

2 Responses to Jazoon 2011, Day 2 – Java Concurrent Animated – Victor Grazi

  1. […] Java Concurrent Animated – Victor Grazi […]

  2. javabreadjam says:

    How do u run the animated jar?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: