There are two additional methods that complement the generic threading facilities that Griffon exposes to the application and its artifacts
isUIThread()
- returns true if the current thread is the UI Thread, false otherwise. Functionally equivalent to calling SwingUtilities.isEventDispatchThread()
in Swing.
execFuture(ExecutorService s, Closure c)
- schedules a closure on the target ExecutorService. The executor service can be left unspecified, if so a default Thread pool executor (with 2 threads) will be used.
execFuture(ExecutorService s, Callable c)
- schedules a callable on the target ExecutorService. The executor service can be left unspecified, if so a default Thread pool executor (with 2 threads) will be used.