Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

Running two tasks that share the same resource in sequence

$
0
0

I am getting the common "The specified resource is reserved." exception. I understand that you cannot run two tasks that share the same resource concurrently. However, is it true that you cannot run two tasks that share the same resource, one right after the other, without completely disposing of the first task?

 

e.g.

// task1 and task2 share the same resource
task1.Start();
task1.Stop();
task2.Start(); // This will always throw an exception until you dispose of task1 (i.e. task1.Dispose())??
task2.Stop();

 


Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>