Groovy Documentation

org.linkedin.glu.groovy.utils.concurrent
[Groovy] Class GluGroovyConcurrentUtils

java.lang.Object
  org.linkedin.groovy.util.concurrent.GroovyConcurrentUtils
      org.linkedin.glu.groovy.utils.concurrent.GluGroovyConcurrentUtils

class GluGroovyConcurrentUtils
extends GroovyConcurrentUtils

Authors:
yan@pongasoft.com


Method Summary
static java.util.concurrent.Callable asCallable(groovy.lang.Closure closure)

The purpose of this call is to convert a closure into a callable.

 

Method Detail

asCallable

static java.util.concurrent.Callable asCallable(groovy.lang.Closure closure)
The purpose of this call is to convert a closure into a callable. The issue when writing closure as Callable is that this code does not throw exception and then you get weird exception handling (InvocationTargetException).
Parameters:
closure
Returns:
the callable which runs the closure


 

Groovy Documentation