Vaadin Session, UI, locks & detach behavior

Hello,

I have a question regarding UI locking during detach. My scenario is multiple threads modifying a component, all modifications are wrapped in:


MyUI.get().access(new Runnable() {

   @Override
   public void run() {
      modifyData(........);
   }
}

There is also a PUSH thread, also locking the GUI for the push.

Nonetheless, during UI detach, the lock on UI is being acquired but never released.

Is locking an UI from different threads allowable? How is the following scenario handled:


1. Thread A acquires UI lock, starts doing some operations with component X
2. Thread B performs detach on a component X

What happens with the lock?

Kind regards & thank you for any pointers,


Jacek

Not sure exactly what the question is but before any operation is performed on the VaadinSession (which contains all UI instances for the user) the session must be locked. If Thread A acquires the lock and starts doing some operation, thread B can’t (should not) detach or do anything else with anything inside the VaadinSession without acquiring the lock. Thread B will then acquire the lock after thread A has finished updating the UI.