Monday, April 20, 2009

Extending Java’s Semaphore to Allow Dynamic Resizing

Marshall wrote an excellent post explaining how to dynamically change the number of permits when using semaphores in Java, which I thought I'd share for anyone interested. This can be particularly useful if you have a long-running daemon which you don't wish to restart for changes such as this. If you are using semaphores in Java, or if you don't even use Java but just want to learn more about semaphores, I'd recommend giving it a read.

No comments: