A different view on creation

added by DotNetKicks
9/7/2016 1:33:48 PM

1 Kicks, 178 Views

In the second scenario, we are passing a delegate, so we'll only create the RequestExecuter once. Or so it seems. The problem is that under concurrent load, it is possible that we'll have two RequestExecuters created, only one of which will be used. If we have any unmanaged resources in the RequestExecuter, that can cause a leak.