jsoup线程安全 [英] jsoup thread safety

查看:161
本文介绍了jsoup线程安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jsoup parse(String html)未被认为是线程安全的.您如何同时使用Jsoup解析多个文档?谢谢

Jsoup parse(String html) is not ducumented as thread safe. How do you parse multiple documents with Jsoup concurrently? Thanks

推荐答案

通过使用Joup.parse.

只要您不在同一文档上,它就会在内部创建新对象.

As long as you're not working on the same document, it creates new object internally.

https://groups.google.com/forum/?fromgroups=#!topic /jsoup/QIij7DEhj8E

这不时出现;可能值得为此提出文档问题.

This comes up from time to time; it's probably worth filing a documentation issue against this.

这篇关于jsoup线程安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆