Locking version to avoid System.Concurrency.