Package io.jmix.ui.executor
Interface UIAccessor
public interface UIAccessor
Interface that allows to read/write state of UI from background threads.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Provides exclusive access to UI state from outside a UI event handling thread.void
accessSynchronously
(Runnable runnable) Locks the UI and runs the provided Runnable right away.
-
Method Details
-
access
Provides exclusive access to UI state from outside a UI event handling thread. The given runnable is executed while holding the UI lock to ensure exclusive access to UI state. Please note that the runnable might be invoked on a different thread or later on the current thread, which means that custom thread locals might not have the expected values when the runnable is executed.- Parameters:
runnable
- runnable
-
accessSynchronously
Locks the UI and runs the provided Runnable right away. The given runnable is executed while holding the UI lock to ensure exclusive access to UI state.- Parameters:
runnable
- runnable
-