grails 2.3 async: thread pool configuration...?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

grails 2.3 async: thread pool configuration...?

tony_k
couldn't spot it in the documentation.

is there a way to configure the thread pool that grails is using for it's async processing...?
Reply | Threaded
Open this post in threaded view
|

Re: grails 2.3 async: thread pool configuration...?

smaldini
Not really a proper answer but anyway. 
As an alternative you could use the events plugin (https://github.com/reactor/grails-events) which replaces the gpars factory by its own, and then you can use the DSL artifact to tweak your thread pool. 
When I write "replaces" I mean all @Async feature automatically switch to use Reactor dispatching facilities instead of gpars so that is something to consider and to understand to leverage the best of this plugin :)


On Fri, Sep 27, 2013 at 1:07 PM, tony_k <[hidden email]> wrote:
couldn't spot it in the documentation.

is there a way to configure the thread pool that grails is using for it's
async processing...?



--
View this message in context: http://grails.1312388.n4.nabble.com/grails-2-3-async-thread-pool-configuration-tp4649699.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Stéphane
--

Reply | Threaded
Open this post in threaded view
|

Re: grails 2.3 async: thread pool configuration...?

Sumanth
In reply to this post by tony_k
def group1 = new DefaultPGroup(new ResizeablePool(true))
def group2 = new DefaultPGroup(2)
-----
    String testPromiseWithPools(String arg1) {
       Promise p1 = new GparsPromise(group1.task {
            log.debug('in ResizeablePool')
            rest.get("http://echo.jsontest.com/YouSaid/${arg1}").json.YouSaid
        })
        Promise p2 = new GparsPromise(group2.task {
            log.debug('in DefaultPGroup with size 2')
            rest.get("http://md5.jsontest.com/?text=${arg1}").json
        })
        //promiseList.get()
        waitAll(p1, p2)
    }