Apr 23, 2012 at 9:44 PM
Edited Apr 25, 2012 at 2:45 AM
The Incremental class is thread safe.
However, RetryPolicy<T> is not thread safe. The reason is that the retrying delegate is publicly exposed:
public event EventHandler<RetryingEventArgs> Retrying;
So it is possible to have a race condition when/if multiple threads are modifying the delegate. Some good reading on that topic is Eric Lippert's
Events and Races. Another consideration would be what the delegate code is doing and whether or not that is thread safe.
It appears it should be possible to use RetryPolicy in a thread safe manner but that is not guaranteed and will depend on the specific implementation.
Enterprise Library support engineer