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

adding close to Asciidoctor to avoid to leak when creating an asciidoctor instance #849

Merged

Conversation

rmannibucau
Copy link
Contributor

Currently Asciidoctor instance can't be released.
With JRuby it means at least 2 pools are leaking each time an instance is created.
It leads to a lot of issues in several environments.
This PR adds a close() method to Asciidoctor and ensures JRuby instance is properly released when called.

Saved ~1mn on 1mn16s of execution with exec-maven-plugin for instance and avoids leakage in EE context.

@headius
Copy link
Contributor

headius commented Sep 25, 2019

FWIW, a JRuby instance that becomes GCable will eventually shut itself down, but we strongly recommend tearing it down once the instance is no longer needed.

PR seems 👍 to me.

@robertpanzer
Copy link
Member

Thanks!
Just have to remember that the next release has to be 2.2.0 instead of 2.1.1.

@robertpanzer robertpanzer merged commit fd4c6d2 into asciidoctor:master Sep 25, 2019
@rmannibucau rmannibucau deleted the ensure-to-teardown-ruby-instance branch September 25, 2019 07:59
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

Successfully merging this pull request may close these issues.

None yet

3 participants