• 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
GenRocket Founder
Ranch Hand
Posts: 15302
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