This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using GPars with Grails

 
Maharaj thak
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have started playing with GPars.Now I have a class

class Job{

String language

}

I want to show how many jobs are advertised for each language.I have done something like this in the Controller

GParsPool.withPool {

final List result=["Java","Groovy","Scala"].collectParallel{Job.countByLanguageIlike("%{it}%")}
println result
}

The result I am getting is [0,0]

Anybody got any ideas as to where am I going wrong.

Regards
Mauji Thak
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should {it} be ${it} ??
 
Maharaj thak
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Gregg that worked.

Regards
mauji thak
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic