concurrency runtime and wwsapi
-
2010年7月21日 下午 06:15
I have several WWSAPI web services started and waiting for commands.
Need to call them as simultaneously as possible. I suppose concurrency runtime
is the way to go.
Basically the call to web service is as follows:hr = DefaultBinding_XXX(
proxy,
(WCHAR *)WrkObjNameL,
&result,
heap,
NULL,
0,
asyncContext,
error);
What would be the best practice to call 10 parallel
DefaultBinding_XXX?
所有回覆
-
2010年7月24日 上午 05:44
If you'd like to use concrt for this, I would suggest either using a parallel_for or a task_group. If the call the DefaultBinding_XXX is going to block I would recommend making a call to notify concrt of the blocking operation with:
Concurrency::Context::Oversubcribe(true);and a matching it with an Oversubscribe(false) call when the operation is completed because concrt is a cooperative scheduler by default and will only oversubscribe unless it is aware of blocking. Note that this isn't necessary on Win7 x64 when the SchedulerPolicy UmsThreadDefault is set.
Rick Molloy Parallel Computing Platform : http://blogs.msdn.com/nativeconcurrency http://parallelroads.com/blog- 已提議為解答 Dana Groff 2010年7月24日 下午 07:39
- 已標示為解答 rickmolloy 2010年8月5日 上午 06:24
-
2010年7月31日 上午 04:57
I hope that Rick's answer addresed your question. If it did not, please feel free to qualify the question. If it did, please mark this thread as answered. If we don't hear from you by Wednesday 8/4/2010, I will mark it as answered.
Thank you,
Dana Groff
-
2010年8月5日 上午 07:49
Thank you,
This solved the problem.

