Thread Safety and Immutability

We can make sure that objects shared between threads are never updated by any of the threads by making the shared objects immutable, and thereby thread safe.

The ImmutableValueclass is thread safe, but the use of it is not. This is something to keep in mind when trying to achieve thread safety through immutability.

results matching ""

    No results matching ""