Huristic/io

A technology blog

By engineers for engineers

  • Home
  • Blog
  • Research
  • Sign Up
  • About

Fun Java Deadlock Puzzle →

March 30, 2018 by David Khanaferov in java, computer science

A fun Java concurrency problem has been seen around some corners of the internet. I'm not sure of the real origin of this problem, but I was introduced to it from a friend of a friend who saw a poster somewhere around an Amazon stand at some software engineering conference. It centers around a simple Java class ThreadNinja which uses reckless synchronization around methods and is designed to generate a deadlock. The goal is to describe a scenario in which a deadlock would occur. The puzzle part if not too puzzling, but not obvious at first glance, so I thought I'd throw in my two cents and maybe show some code that could be used to prove (and I use the term lightly) the outcome. 

Read More
March 30, 2018 /David Khanaferov
java, puzzles, concurrency, deadlocks, threads, synchronized, mutex, locks
java, computer science

Copyright © 2018

The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of David Khanaferov