When you want to initialize a shared resource in a multithreaded application, you have two possibilities to choose from – optimistic and pessimistic. The difference between them is visible from the pseudocode. var Shared: T;procedure OptimisticInitializer;var temp: T;begin if not assigned(Shared) ...
More...