Re: synchronize keyword may produce deadlocks.

2001-05-28 Thread yhs1634
>You do know your code has a typo that will cause deadlocks, don't >you? See below... > arrgh. i screwed that one up. correcting the typo allows the code to run fine. ok..i cant prove it with my example code, but under heavy loads the deadlock does occurunfortunately im not yet ready to d

synchronize keyword may produce deadlocks.

2001-05-27 Thread yhs1634
Hi, The synchronize call may deadlock due to thread starvation. This is present in all versions of java on all platforms i could test (jdk 1.1 thru 1.4b on win/sol/lin) Example code for interlock.java is as follows : import java.io.*; import java.lang.*; public class interlock{ public static i