1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

* NPE bugfix for parallel() function

This commit is contained in:
Reinhard Pointner 2012-06-15 10:04:11 +00:00
parent d01d858713
commit ad79f0c13d

View File

@ -52,7 +52,7 @@ import java.util.concurrent.*
def parallel(List closures, int threads = Runtime.getRuntime().availableProcessors()) {
def tasks = closures.collect { it as Callable }
return Executors.newFixedThreadPool(threads).invokeAll(tasks).collect{ _guarded { it.get() } }
return Executors.newFixedThreadPool(threads).invokeAll(tasks).collect{ c -> _guarded { c.get() } }
}