woensdag, maart 07, 2007

Eclipse XPS 1.1.1 released

From The Threads Are Nasty Department...

I have just uploaded the 1.1.1 release of the Eclipse XPS plug-in. It fixes a race condition which caused the LEDs to show the start color at the end of a really short test run. And by 'short' I mean really really really short.

The last couple of days I have learned to always use the "volatile" keyword when sharing variables between threads. Important... but not the solution to the problem that was reported.

The real fix was handed to me by a colleague: there is a considerable delay between calling Thread.start() and the execution of the first statement in your thread's run() method. In fact, Java/Eclipse is able to execute a full JUnit test (that only contains a fail() statement) before a thread that gets started at the beginning of the test run even gets a chance to do anything.

Geen opmerkingen:

Een reactie plaatsen