-
Notifications
You must be signed in to change notification settings - Fork 4
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
the library is not thread-safe #37
Comments
Confirmed, thanks for reporting! I wasn't aware that nekohtml (or xerces, maybe?) was not thread safe. What a nightmare. Let me look into this, there's a trivial but very inefficient fix, I'd like to try and do something clean. |
Yes, in Java world, it's ok for XML parser configuration to be changed in a non-thread safe way during parsing. (╯°□°)╯︵ ┻━┻
@dportabella how urgently do you need the fix? PR #38 fixes the issue. If you need it as soon as possible, I can merge and cut a release when I get home tonight. Otherwise, I'd like to take a bit of time to write a non-regression test for this before merging. |
Yes, in Java world, it's ok for XML parser configuration to be changed in a non-thread safe way during parsing. (╯°□°)╯︵ ┻━┻
thx! :) |
[#37] Synchronize parsing on the HTML configuration.
The fix has been released in v0.3.1, available on sonatype now, and on maven central as soon as it syncs. Could you confirm that it works for you and close the issue if it does? |
cool, it works for me, thx! |
this code fails because of a thread-safe problem.
it works if removing the
.par
call (which makes a parallel seq).it works if removing the
import kantan.xpath.nekohtml._
.how to use kantan in multiple threads?
fails with:
The text was updated successfully, but these errors were encountered: