Home » Tag Archives: Concurrency (page 4)

Tag Archives: Concurrency

Concurrency Fundamentals: Deadlocks and Object Monitors

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Liveness 1.1. A Deadlock 1.2. ...

Read More »

Introduction to Threads and Concurrency

java-logo

This article is part of our Academy Course titled Java Concurrency Essentials. In this course, you will dive into the magic of concurrency. You will be introduced to the fundamentals of concurrency and concurrent code and you will learn about concepts like atomicity, synchronization and thread safety. Check it out here! Table Of Contents 1. Basic know-how about threads 2. ...

Read More »

Java Concurrency Essentials Tutorial

java-logo

Course Overview Concurrency is always a challenge for developers and writing concurrent programs can be extremely hard. There is a number of things that could potentially blow up and the complexity of systems rises considerably when concurrency is introduced. However, the ability to write robust concurrent programs is a great tool in a developer’s belt and can help build sophisticated, ...

Read More »

Agrona’s Threadsafe Offheap Buffers

java-logo

This blog post continues my ongoing series on the Agrona library by explaining how we offer easy access to offheap memory for threadsafe operations. I should probably caveat before we move on that this is a fairly advanced topic and I don’t attempt to explain concepts such as memory barriers – merely outline the features of the API. The deficiencies ...

Read More »

A Case Study in Analysing Latency: Lock vs Synchronized

java-logo

In particular in this post we will discuss: Garbage created by java.concurrent.Lock Comparing Lock to synchronized How to measure latency programatically The impact of contention on Lock and synchronized The impact of co-ordinated omission on latency tests Back to one of my favourite topics garbage creation / allocation. See my previous posts (e.g. First rule of performance optimisation and Revisiting the First Rule of ...

Read More »

Dealing with Interruptions

java-logo

I was just watching the VJUG interview with Heinz Kabutz which inspired me to write a post about Interruptions. By the way I would recommend subscribing to the VJUG YouTube channel – very informative indeed. Heinz is always good value and it’s difficult to watch any of his presentations without learning a lot. He raised the topic of how to deal ...

Read More »

Farewell to Asynchronous Code

java-interview-questions-answers

Quasar is a library that adds true lightweight threads (fibers) to the JVM. These are very cheap and very fast – in fact, fibers behave just like Erlang processes or Go goroutines – and allow you to write simple blocking code while enjoying the same performance benefits of complex asynchronous code. In this post we’ll learn how to transform any asynchronous, ...

Read More »

Shooting yourself in the foot with Random number generators

java-logo

This is not going to be one of the posts explaining how a random number generator is not so random after all. So those of you expecting a guideline for how to hack a slot machine, move along, nothing to see here. Instead, it is a post about one of the not-so-uncommon lock contention issues, hidden inside random number generators ...

Read More »

CompletableFuture can’t be interrupted

java-logo

I wrote a lot about InterruptedException and interrupting threads already. In short if you call Future.cancel() not inly given Future will terminate pending get(), but also it will try to interrupt underlying thread. This is a pretty important feature that enables better thread pool utilization. I also wrote to always prefer CompletableFuture over standard Future. It turns out the more ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials