开发者

Grails + Gpars.memoize().. how to do memoization?

I can't seem to figure out how to do memoization 开发者_StackOverflow中文版in Grails. According to the GPars docs it should be as simple as def c = { x -> x*2 }.memoize() or ... .gmemoize()

But all i seem to get is compilation errors and stacktraces thrown. Has anyone successfully used gpars with grails?


Grails up until 1.4.0m1 bundled an old version of gpars (0.9) that didn't include memoization. Since Grails preferes the bundled libs to the user-specified ones, you never get a chance to see the memoization methods. To my best knowledge the Grails master branch has already fixed that and gives users the freedom to choose a GPars version they like.


We are currently successfully using GPars data flow concurrency in a Grails 1.3.7 application. GPars is defined as a basic jar dependency in BuildConfig.groovy, we are not using the GPars Grails plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜