On 8/9/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote: > Robert Burrell Donkin ha scritto: > > On 8/9/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
<snip> > >> Forgot to say that if this is the case it should be pretty easy to > >> create a test case to prove it. > > > > how would you approach the management of the multiple threads? > > I'm writing the code in thunderbird, so forget syntax and other > problems. Hope you get the idea: > > void testIssue() { > ConditionManager instance1 = ConditionManager.getInstance(); > > Thread otherThread = new Thread() { > public void run() { > ConditionManager.resetInstance(); > } > }.start(); > > otherThread.join(); > > assertEquals(instance1, ConditionManager.getInstance()); > } thanks you're right - it was easy :-) - robert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]