Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTClient and GPars #82

Open
ppazos opened this issue Oct 12, 2017 · 0 comments
Open

RESTClient and GPars #82

ppazos opened this issue Oct 12, 2017 · 0 comments

Comments

@ppazos
Copy link

ppazos commented Oct 12, 2017

I'm trying to test a REST API parallelizing some tasks using GPars.

I have one connection to the server and tried something like:

withPool(5) {
(1..amount).eachParallel {
println it
def res
res = ehrserver.createEhr() // this contains a RESTClient instance used to send POST requests
println res.status +' '+ res.message
}
}

With amount = 100, I'm getting exceptions after the first 30+ runs of the eachParallel:

java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant