How to run a loop concurrently in Groovy?

Viewed 13354

As of now I have code like following in groovy

    HashMap map = new HashMap()
    for(char i='a'; i<='z'; i++) {
      def name = getName(i)
      def info getInfo(i)
      map.put(name, info)
    }
    serializeMap(map)

What is the best way to run this loop concurrently in Groovy?

2 Answers
Related