Click here to Skip to main content
15,887,405 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can not create file using FileStream in release mode Pin
DaveyM699-Sep-10 22:21
professionalDaveyM699-Sep-10 22:21 
AnswerRe: Can not create file using FileStream in release mode Pin
Luc Pattyn10-Sep-10 1:42
sitebuilderLuc Pattyn10-Sep-10 1:42 
QuestionThrottling web service calls on different threads Pin
Gareth H9-Sep-10 7:33
Gareth H9-Sep-10 7:33 
AnswerRe: Throttling web service calls on different threads Pin
Ian Shlasko9-Sep-10 8:10
Ian Shlasko9-Sep-10 8:10 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H10-Sep-10 1:26
Gareth H10-Sep-10 1:26 
GeneralRe: Throttling web service calls on different threads Pin
Ian Shlasko10-Sep-10 1:46
Ian Shlasko10-Sep-10 1:46 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H10-Sep-10 1:50
Gareth H10-Sep-10 1:50 
AnswerRe: Throttling web service calls on different threads Pin
Luc Pattyn9-Sep-10 11:12
sitebuilderLuc Pattyn9-Sep-10 11:12 
I agree with Ian's approach, which basically is tunneling all 3rd party accesses through a single thread.

However, it may not scale well, as in the end either the single thread tunnel or the web service itself will become a bottleneck. If the 3rd party package is slowing down under extra load, my first impression is it is running out of memory and starts to page to disk all the time.

Depending on what exactly causes the phenomenon, you could limit the number of outstanding requests to N (N to be determined and apparently less than 20). Either use a single thread and some logic to achieve this; or just launch N threads, each trying to find and launch one job at a time, all from a single queue (with appropriate lock while accessing the queue).

OTOH, if the web service itself is basically single-threaded (e.g. because a COM component is involved), then whatever multi-threaded stuff you add to feed it may not achieve anything.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Throttling web service calls on different threads Pin
Gareth H10-Sep-10 1:37
Gareth H10-Sep-10 1:37 
AnswerRe: Throttling web service calls on different threads Pin
Abhinav S9-Sep-10 17:30
Abhinav S9-Sep-10 17:30 
GeneralRe: Throttling web service calls on different threads Pin
Gareth H9-Sep-10 21:07
Gareth H9-Sep-10 21:07 
Questionsearch and save to SQL using LINQ in C# Pin
navidsoft9-Sep-10 6:07
professionalnavidsoft9-Sep-10 6:07 
AnswerRe: search and save to SQL using LINQ in C# Pin
Ian Shlasko9-Sep-10 10:42
Ian Shlasko9-Sep-10 10:42 
GeneralRe: search and save to SQL using LINQ in C# Pin
navidsoft9-Sep-10 21:21
professionalnavidsoft9-Sep-10 21:21 
GeneralRe: search and save to SQL using LINQ in C# Pin
Ian Shlasko10-Sep-10 1:43
Ian Shlasko10-Sep-10 1:43 
QuestionCasting ItemsControl.ItemsSource to Generic Collection Pin
Jammer9-Sep-10 5:11
Jammer9-Sep-10 5:11 
AnswerRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
#realJSOP9-Sep-10 7:29
mve#realJSOP9-Sep-10 7:29 
AnswerRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
Ian Shlasko9-Sep-10 10:51
Ian Shlasko9-Sep-10 10:51 
GeneralRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
Jammer9-Sep-10 23:53
Jammer9-Sep-10 23:53 
AnswerRe: Casting ItemsControl.ItemsSource to Generic Collection Pin
Paul Michalik10-Sep-10 9:30
Paul Michalik10-Sep-10 9:30 
Questionwhat is advantges of using interface reference instead of class refernce Pin
am 20098-Sep-10 23:11
am 20098-Sep-10 23:11 
AnswerRe: what is advantges of using interface reference instead of class refernce Pin
DaveyM698-Sep-10 23:14
professionalDaveyM698-Sep-10 23:14 
AnswerRe: what is advantges of using interface reference instead of class refernce Pin
OriginalGriff9-Sep-10 0:22
mveOriginalGriff9-Sep-10 0:22 
AnswerRe: what is advantges of using interface reference instead of class refernce [modified] Pin
Pete O'Hanlon9-Sep-10 1:44
mvePete O'Hanlon9-Sep-10 1:44 
GeneralICheck Pin
Paul Michalik9-Sep-10 20:23
Paul Michalik9-Sep-10 20:23 

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.