HtmlUnit: one WebClient per thread - is it thread safe?

I have a lot of threads. Each thread creates and uses its own WebClient (HtmlUnit framework). No thread uses an instance of WebClient from another thread. Is it thread safe?

+7
source share
1 answer

From the documentation

Note. The WebClient instance is not thread safe. It is intended for use from a single thread.

As long as each thread creates its own WebClient, you will have no problem. From what you said, you are doing the right thing.

+10
source

All Articles