views:

94

answers:

1

Is Apache Commons Exec a thread-safe library?

+3  A: 

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 principal 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