Is Apache Commons Exec a thread-safe library?
Asked
Active
Viewed 947 times
1
-
1do you have reasons to believe it's not? – Gregory Pakosz Apr 18 '10 at 10:31
-
1yes, because I got errors. ;) – dwlnetnl Apr 19 '10 at 16:06
1 Answers
7
Unless the javadoc or other documentation claims that certain classes are thread-safe, you should assume that any library is not thread-safe, and address the synchronization concerns yourself. This particularly applies to the case where your application causes instances of the library's classes to be shared by multiple threads.
The exception to this principle is internal thread-safety that is fundamental to the implementation of the library. For that, you are entitled to assume that these concerns have been addressed by the implementors, because if they haven't been the library will be unreliable.

Stephen C
- 698,415
- 94
- 811
- 1,216