bigdataviewer / bigdataviewer-core

ImgLib2-based viewer for registered SPIM stacks and more
BSD 2-Clause "Simplified" License
33 stars 35 forks source link

BehaviourTransformEventHandler3D: fix dead lock. #106

Closed maarzt closed 4 years ago

maarzt commented 4 years ago

This fixes a deadlock, where one of the listeners wants to sync on ViewerPanel, while an other thread that has a lock on ViewerPanel wants to sync on the viewer transform.

The deadlock was cause by this loop:

for ( int i = 0; i < 60; i++ )
    BdvFunctions.show( ArrayImgs.bytes( 10, 10 ), "image" ).close();
tpietzsch commented 4 years ago

I just merged #99 where this was already fixed in a more fundamental way. Basically, in the "old version", it is unfixable because both the ViewerState and the TransformEventHandler have a transform that they try to keep in sync. In #99 only the ViewerState owns the transform.