9

I have many threads. Each thread creates and uses it's own WebClient (HtmlUnit framework). No one thread uses WebClient's instance from other thread. Is it thread safe?

Jk1
  • 11,233
  • 9
  • 54
  • 64
den123
  • 793
  • 1
  • 12
  • 27

1 Answers1

14

From the documentation

Note: a WebClient instance is not thread safe. It is intended to be used from a single thread.

As long as each thread creates its own WebClient, you won't have any issues. From what you said, you're doing the right thing.

Augusto
  • 28,839
  • 5
  • 58
  • 88