Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
Questionmultithread performance problem for web service call Pin
George_George3-Feb-09 2:39
George_George3-Feb-09 2:39 
AnswerRe: multithread performance problem for web service call Pin
EliottA3-Feb-09 2:41
EliottA3-Feb-09 2:41 
GeneralRe: multithread performance problem for web service call Pin
George_George4-Feb-09 21:46
George_George4-Feb-09 21:46 
AnswerRe: multithread performance problem for web service call Pin
Yasithl3-Feb-09 3:01
Yasithl3-Feb-09 3:01 
GeneralRe: multithread performance problem for web service call Pin
George_George4-Feb-09 21:48
George_George4-Feb-09 21:48 
AnswerRe: multithread performance problem for web service call Pin
Ennis Ray Lynch, Jr.3-Feb-09 3:24
Ennis Ray Lynch, Jr.3-Feb-09 3:24 
GeneralRe: multithread performance problem for web service call Pin
George_George4-Feb-09 21:55
George_George4-Feb-09 21:55 
GeneralRe: multithread performance problem for web service call Pin
Ennis Ray Lynch, Jr.5-Feb-09 3:00
Ennis Ray Lynch, Jr.5-Feb-09 3:00 
Stack<Items> stack ...;

public void MyThread(object whocares){
    while(go){
        Item item = null;
        lock(stack){
            item = stack.Pop();
        }
        if(item != null){
            //Process Item
        }
    }
}


Then you need somewhere to run start the loop

System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(MyThread)); 


Now just push items on the stack when they need to be called in another thread. There are many modifications to this basic theme.


Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.


If you don't ask questions the answers won't stand in your way.


Most of this sig is for Google, not ego.


GeneralRe: multithread performance problem for web service call Pin
George_George7-Feb-09 1:23
George_George7-Feb-09 1:23 
AnswerRe: multithread performance problem for web service call [modified] Pin
harold aptroot3-Feb-09 3:26
harold aptroot3-Feb-09 3:26 
GeneralRe: multithread performance problem for web service call Pin
George_George4-Feb-09 21:51
George_George4-Feb-09 21:51 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot5-Feb-09 0:21
harold aptroot5-Feb-09 0:21 
GeneralRe: multithread performance problem for web service call Pin
George_George5-Feb-09 1:41
George_George5-Feb-09 1:41 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot5-Feb-09 1:56
harold aptroot5-Feb-09 1:56 
GeneralRe: multithread performance problem for web service call Pin
George_George5-Feb-09 2:47
George_George5-Feb-09 2:47 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot5-Feb-09 3:40
harold aptroot5-Feb-09 3:40 
GeneralRe: multithread performance problem for web service call Pin
George_George7-Feb-09 1:31
George_George7-Feb-09 1:31 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot7-Feb-09 2:25
harold aptroot7-Feb-09 2:25 
GeneralRe: multithread performance problem for web service call Pin
George_George7-Feb-09 2:39
George_George7-Feb-09 2:39 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot7-Feb-09 4:07
harold aptroot7-Feb-09 4:07 
GeneralRe: multithread performance problem for web service call Pin
George_George7-Feb-09 22:26
George_George7-Feb-09 22:26 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot7-Feb-09 23:51
harold aptroot7-Feb-09 23:51 
GeneralRe: multithread performance problem for web service call Pin
George_George8-Feb-09 0:22
George_George8-Feb-09 0:22 
GeneralRe: multithread performance problem for web service call Pin
harold aptroot8-Feb-09 0:37
harold aptroot8-Feb-09 0:37 
GeneralRe: multithread performance problem for web service call Pin
George_George8-Feb-09 0:48
George_George8-Feb-09 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.