-
Notifications
You must be signed in to change notification settings - Fork 4
Blocking code
chsbe edited this page May 17, 2016
·
2 revisions
Sometimes you have to call blocking APIs from your show (Most of existing APIs in the java world are blocking). In that case you can call the show.blocking(Closure closure) method.
This will execute the function in a separated thread pool avoiding the blocking of the show event loop.
show.blocking(function() {
java.lang.Thread.sleep(10000)
})show.blocking {
sleep 10000
}