Multithreading

Episode 57. Sometimes you want to buy local, ThreadLocal that is!

Threadlocal is great! It can help you get out of sticky situations, and give you a great boost of performance and/or isolation. But with great tools comes great responsibility. Threadlocal can also be misused, and create memory leaks, or object corruption, and unknown sharing. So if you ever had seen one and never quite got what it does, or even if you were consider using one. Take a listen! And steer the people in the right way for the use of Threadlocal.

Also, Thanks Michael for pointing the issue with episode 55 and rebasing!

Don’t forget to SUBSCRIBE to our cool new NewsCast!
Java Off Heap

 

Do you like the episodes? Want more? Help us out! Buy us a beer!

Episode 56. Let’s have a frank talk about Unsafe! and why you shouldn’t (or should) use it

So you heard about sun.misc.unsafe. Even if you are in certain circles you might have heard about that it was (almost) removed from Java 9. And if you were really paying attention you would’ve heard the cries of every major Java Framework to the news. While it didn’t happen (Unsafe is still in Java 9, and possibly in Java 10+), we should dive into why is it so attractive, and creates such a divided opinion (JVM implementers want it gone. Performance nuts want it in)

Don’t forget to SUBSCRIBE to our cool new NewsCast! Java Off Heap

Do you like the episodes? Want more? Help us out! Buy us a beer!

Episode 38. Hyperthreading, L1/L2 caching, cache busting, thread trashing, and priority bumping!

So we hear about HyperThreading and how it is sooo cool, well, it is and it isn’t. If you are really trying to squeeze performance out of your application HyperThreading might not be what you’re looking for. There are so many other things that happens at the CPU level that have so weird names (like Thread Thrashing, ‘say whaaaat?’). If you are really serious on squeezing every worthy CPU cycle of your app (or if you’re interesting on what really really goes under the hood) take a listen! (ah! and treat me a beer, if you like what you hear!)

Follow
Me
on
Twitter! (@fguime) (thanks!)

Hey it’s ALMOST SUMMER! and I would love to get a beer 🙂

Tweet, Tweet! (https://twitter.com/#!/fguime)

 

Vote for us in iTunes (http://itunes.apple.com/us/podcast/java-pub-house/id467641329)
Questions, feedback or comments! comments@javapubhouse.com

Subscribe to our podcast! (http://javapubhouse.libsyn.com/rss)
ITunes link (http://itunes.apple.com/us/podcast/java-pub-house/id467641329)
Java 7 Recipes book! (http://www.amazon.com/gp/product/1430240563/ref=as_li_ss_il?ie=UTF8&tag=meq-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1430240563)
Hey! if you like what you hear, treat me a beer! (It’s the Java pub house after all 🙂 https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Z8V2ZWV93UMW4

Episode 23. Who is interrupting me while I sleep in the waiting room? (A talk on wait/notify and interruptedExceptions)

It always starts when you do your first Thread.sleep(). Why do I have to check for InterruptedException? is it serious? why do I have to catch it? We start with answering these questions and step down the rabbit hole to discover the inner workings of Wait/Notify (and what the IllegalMonitorStateException really means). If you ever have to work with more than one thread (who doesn’t nowadays?) take a listen! You’ll be notify()ed of your success!

Twitter, twitter, twitter, twitter! (https://twitter.com/#!/fguime)
Hey! if you like what you hear, treat me a beer! (It’s the Java pub house after all 🙂

Wait/Notify http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()
Concurrency Utilities http://java.sun.com/developer/technicalArticles/J2SE/concurrency/
Thread description from the JVM Specs http://docs.oracle.com/javase/specs/jvms/se5.0/html/Threads.doc.html#22488
Vote for us in iTunes (http://itunes.apple.com/us/podcast/java-pub-house/id467641329)
Questions, feedback or comments! comments@javapubhouse.com
Subscribe to our podcast! (http://javapubhouse.libsyn.com/rss)
ITunes link (http://itunes.apple.com/us/podcast/java-pub-house/id467641329)
Java 7 Recipes book! (http://www.amazon.com/gp/product/1430240563/ref=as_li_ss_il?ie=UTF8&tag=meq-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1430240563)
Hey! if you like what you hear, treat me a beer! (It’s the Java pub house after all 🙂 https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Z8V2ZWV93UMW4

Episode 11. New Year’s Resolution: Object Thread Safety! + Listener feedback, and the birth of a Google Group!

In this podcast we air our first question/feedback from our listener and dive a little into it (related to Dependency Injection). We also talk about how to create Thread Safe objects (There is the easy way, and the hard way). And at last! we have a Google group where you can add/post comments and open discussions.

Our new Google Groups
http://groups.google.com/group/javapubhouse/

Questions, feedback or comments!comments@javapubhouse.com

Subscribe to our podcast! (http://javapubhouse.libsyn.com/rss)
ITunes link (http://itunes.apple.com/us/podcast/java-pub-house/id467641329)

Episode 7. Threads, Priorities, and Swing’s Golden Rule

In this episode we talk about Threads and Threading, the difference between Daemon and User Threads, and why changing priorities is not for the weak of heart. Also we cover Swing’s golden Threading rule (with the Event Dispatching Thread). If you ever typed new Thread(), or if you heard to be careful about Swing and Threading, this episode is for you!

 

Episode 5. Producing and Consuming, ThreadPoolExecutor, and Latency vs Throughput

In this podcast we dive into the age-old producer and consumer problem, talked about the different aspects of it (what does it really solve?), and explain the difference between throughput vs latency. Lastly we discuss the ThreadPoolExecutor and how to fine tune it for your particular project needs!

 

Episode 3. Memory leaks, memory references and garbage collections!

This episode goes deep into memory in Java, understanding how memory leaks happen (and how to solve them!), also how to design to avoid memory leaks, weak and soft references, and how the Garbage collector works (Eden, Tenured, Perm). This podcast will help everyone that needs to take care of a memory leak!

Kudos to VisualVM and VisualGC!

 

Episode 2. Deadlock, Livelock, Escaped locks, and wait/notify oh my!

In this episode of Java pub house, we talk about Deadlocks, livelocks (and other spooky things). Most importantly we talk on how to spot them (using jstack, or visualvm), and how to program defensively against them. We also talk about escaped locks (the source of most deadlocks), and the wait/notify language construct. Finally we describe the unfairness of the lock (locks are not “fair” by default), and why is it so.

Happy Programming!

Episode 1. Volatile, and Synchronized

On this Episode, we talk about the keyword “volatile”, and what does it really mean. Even if you are a multithreading guru, this chapter goes in deep of the different things that volatile protects you from, including L2 caches and code re-ordering. We also cover the use of synchronized, and why, even though is convenient, it might create more headache than it actually solves.

Happy Programming!