Click here to Skip to main content
16,011,974 members
Home / Discussions / C#
   

C#

 
GeneralRe: Finding a custom event using reflection Pin
CDP180215-Nov-11 22:14
CDP180215-Nov-11 22:14 
GeneralRe: Finding a custom event using reflection Pin
Wayne Gaylard15-Nov-11 22:35
professionalWayne Gaylard15-Nov-11 22:35 
GeneralRe: Finding a custom event using reflection Pin
CDP180215-Nov-11 22:54
CDP180215-Nov-11 22:54 
GeneralRe: Finding a custom event using reflection Pin
BobJanova16-Nov-11 3:03
BobJanova16-Nov-11 3:03 
QuestionAssigned AppPool resets after completion of Web Deployment Setup when using Custom Actions Pin
www.Developerof.NET15-Nov-11 2:22
www.Developerof.NET15-Nov-11 2:22 
QuestionUnable to add event handler for Minimizing the Ribbon Control in WPF Pin
Kushagra Tiwari15-Nov-11 2:10
Kushagra Tiwari15-Nov-11 2:10 
AnswerRe: Unable to add event handler for Minimizing the Ribbon Control in WPF Pin
JF201515-Nov-11 3:27
JF201515-Nov-11 3:27 
QuestionSynchronous webservice calls briefly freeze up multithreaded application Pin
CDP180215-Nov-11 1:27
CDP180215-Nov-11 1:27 
I have an XNA application which runs in several threads. One thread takes care of the 3D rendering, the other one is a GUI with the application logic. The controls of the GUI are also drawn by the rendering thread, therefore some thread synchronization between the UI thread and the rendering thread exists. Basically this is neeeded only when a control's properties are changed so that the control must be redrawn. Locks are only needed while those properties are changed, so that a control is not accidentally drawn with only half of the changes, causing ugly rendering glitches. This synchronization is only brief and does not cause any visible delay in rendering or in the performance of the UI thread.

The UI thread makes use of a webservice to fetch or write data from and to the server. With synchronous webservice calls I would expect the UI thread to freeze up while waiting for the response. This should have no bearing on the rendering thread, as the UI thread is waiting and not making any changes to controls. Against this expectation, the rendering thread also briefly freezes when a web method is called.

Using asynchronous webservice calls solves the problem and will be the way to go, but I also would like to understand what is going on. I use a quad I7 proceesor at 4 GHz, so calling a web method in a multithreaded application should (and does not) generate a CPU load of 100%. Also it cannot be because of thread synchronization.
And from the clouds a mighty voice spoke:
"Smile and be happy, for it could come worse!"

And I smiled and was happy
And it came worse.




modified 15-Nov-11 7:58am.

AnswerRe: Synchronous webservice calls briefly freeze up multithreaded application Pin
BobJanova15-Nov-11 2:41
BobJanova15-Nov-11 2:41 
GeneralRe: Synchronous webservice calls briefly freeze up multithreaded application Pin
CDP180215-Nov-11 3:09
CDP180215-Nov-11 3:09 
QuestionCan anyone explain how this Regex works? Pin
fiaolle14-Nov-11 22:17
fiaolle14-Nov-11 22:17 
AnswerRe: Can anyone explain how this Regex works? Pin
PIEBALDconsult15-Nov-11 1:53
mvePIEBALDconsult15-Nov-11 1:53 
AnswerRe: Can anyone explain how this Regex works? Pin
BillWoodruff15-Nov-11 2:28
professionalBillWoodruff15-Nov-11 2:28 
AnswerRe: Can anyone explain how this Regex works? Pin
BobJanova15-Nov-11 2:47
BobJanova15-Nov-11 2:47 
QuestionCompiling x86 - x64 Pin
V.14-Nov-11 22:07
professionalV.14-Nov-11 22:07 
GeneralRe: Compiling x86 - x64 Pin
harold aptroot14-Nov-11 22:45
harold aptroot14-Nov-11 22:45 
GeneralRe: Compiling x86 - x64 Pin
V.14-Nov-11 22:57
professionalV.14-Nov-11 22:57 
GeneralRe: Compiling x86 - x64 Pin
Pete O'Hanlon14-Nov-11 23:04
mvePete O'Hanlon14-Nov-11 23:04 
GeneralRe: Compiling x86 - x64 Pin
V.14-Nov-11 23:21
professionalV.14-Nov-11 23:21 
GeneralRe: Compiling x86 - x64 Pin
harold aptroot14-Nov-11 23:07
harold aptroot14-Nov-11 23:07 
GeneralRe: Compiling x86 - x64 Pin
V.14-Nov-11 23:24
professionalV.14-Nov-11 23:24 
GeneralRe: Compiling x86 - x64 Pin
harold aptroot15-Nov-11 0:19
harold aptroot15-Nov-11 0:19 
GeneralRe: Compiling x86 - x64 Pin
V.15-Nov-11 0:37
professionalV.15-Nov-11 0:37 
QuestionPage Navigation Pin
pravin_mun14-Nov-11 18:43
pravin_mun14-Nov-11 18:43 
AnswerRe: Page Navigation Pin
Hum Dum14-Nov-11 19:28
Hum Dum14-Nov-11 19:28 

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.