Although running a parallel foreach that makes async calls is a pretty usual thing, I found my self in a very complicated situation, when async delegate calls got in the way!
The following gist file, is a basic structure of what I was trying to do: Ask
MemoryCacheManager for an item with
AddOrGetExisting by passing a
key to find the object and a generic delegate Func
task that actually returns the object.
Read More »Thread synchronisation with SemaphoreSlim and async delegate calls