Reputation: 11
HI i am new to the the whole programming thing, i have been given a task to multithread 4 stored procedures where each thread runs asynchronously so that the user can get output real quick i have to do it using WCF can anyone help me out with this. Initially what i am trying to do is taking each procedure and getting how much time it takes to execute using parametrizedthreadstart, but i am not sure how to go about it.
Upvotes: 1
Views: 1310
Reputation: 21
Considering you are new to the whole programming thing, you can follow these very basic steps to get thing done.
MySP(string name);
MySP(string name)
method as MySPAsync(string name)
MySPCompleted
event, subscribe to it.I hope this helps you get started :)
Upvotes: 2
Reputation: 10624
There are a couple of different ways to do this. At the highest level, you can place each service request in it's own service endpoint. This could be defining endpoints for each method, or if you are hosting in IIS, placing each service it's own website. At the lower level, you could define callbacks for each method so that WCF will not block while the method calls are taking place.
Upvotes: 0