9.2.1 Synchronous Calls - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
9.2.1 Synchronous Calls
Synchronous calls inside the UIThread are made by invoking theexecInsideUISync{}
method. This method is equivalent to calling edt{}
in Swing.Example:class MyController { def model def action1 = { // will be invoked inside the UI thread by default (pre 0.9.2) def value = model.value Thread.start { // do some calculations execInsideUISync { // back inside the UI thread model.result = … } } } def action2 = { // will be invoked outside of the UI thread by default (post 0.9.2) def value = model.value // do some calculations execInsideUISync { // back inside the UI thread model.result = … } } }