About a month ago there was a post on the PFX blog
Do you use LazyInitMode.AllowMultipleExecution?As suggested in that Post, I also think this mode has little use. It will allow multiple threads to execute and thereby prevent them from beeing blockd. But if I have the choice between blocking a thread or having two threads do the same thing and throw away the result of one of them I will always choose to block. Waiting in my opinion is not a bad thing if there is nothing usefull to do.
I also noticed that in Beta 1 this option has been renamed into
AllowMultipleThreadSafeExecutionWhile this name does state what it does I do think it can be confusing. A developer new to this API might think that A
llowMultipleThreadSafeExecution will be 'safer' then
EnsureSingleThreadSafeExecution. As it suggests that the first is even thread safe when using multiple threads, but the latter is only safe when there is just one thread.
So if you ask me (and you did) I would drop this option, if only it were to prevent developers to use it by mistake. Another option would be to create two searate switches, one for ThreadSafety, and one for multiple execution. In any case it shoud be made more clear than it is now that
NotThreadSafe and EnsureSingleThreadSafeExecution are the preferred options (depending on the scenario ofcourse).