Click here to Skip to main content
15,888,816 members
Home / Discussions / C#
   

C#

 
QuestionBest practice with threads? Pin
6-Sep-05 3:13
suss6-Sep-05 3:13 
AnswerRe: Best practice with threads? Pin
John Fisher6-Sep-05 4:36
John Fisher6-Sep-05 4:36 
Depending upon how many files you may be converting simultaneously, you could run into slower performance because of too many threads. So, the ideal solution would be to use a thread pool of some kind. And here, you're in luck! There is an easy-to-use thread pool built into the .NET Framework.

With no more information that what you've described, I would suggest that you do something similar to the converter-thread idea. Combine this with the built-in thread pool capabilities of the .NET Framework.

To do this, either create events in the first and third modules, having the converter subscribe to them. Or, create a delegate in the converter module, which the first and third modules can access. Then, instead of simply calling the delegate directly, use the BeginInvoke() method. (Also, make sure you handle things properly with EndInvoke when the callback is triggered. Otherwise, you can have leaks.) This method will use the built-in thread pool to execute the function used by the delegate!





John

"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.

AnswerRe: Best practice with threads? Pin
Andy Brummer6-Sep-05 4:46
sitebuilderAndy Brummer6-Sep-05 4:46 
Questioncode management software Pin
Mridang Agarwalla6-Sep-05 2:50
Mridang Agarwalla6-Sep-05 2:50 
QuestionFaulting application Pin
BenniEvald6-Sep-05 2:24
BenniEvald6-Sep-05 2:24 
QuestionFill After Insert Fails Pin
rich_wenger6-Sep-05 2:00
rich_wenger6-Sep-05 2:00 
AnswerRe: Fill After Insert Fails Pin
John Fisher6-Sep-05 4:53
John Fisher6-Sep-05 4:53 
QuestionUnload DOM Pin
ksanju10006-Sep-05 1:28
ksanju10006-Sep-05 1:28 
AnswerRe: Unload DOM Pin
John Fisher6-Sep-05 5:21
John Fisher6-Sep-05 5:21 
GeneralRe: Unload DOM Pin
ksanju10006-Sep-05 20:35
ksanju10006-Sep-05 20:35 
GeneralRe: Unload DOM Pin
John Fisher7-Sep-05 4:09
John Fisher7-Sep-05 4:09 
QuestionWeb Services in VS 2003 Pin
seee sharp6-Sep-05 1:22
seee sharp6-Sep-05 1:22 
QuestionRichetextbox problem again Pin
snouto6-Sep-05 1:13
snouto6-Sep-05 1:13 
AnswerRe: Richetextbox problem again Pin
S. Senthil Kumar6-Sep-05 1:51
S. Senthil Kumar6-Sep-05 1:51 
GeneralRe: Richetextbox problem again Pin
snouto6-Sep-05 2:08
snouto6-Sep-05 2:08 
GeneralRe: Richetextbox problem again Pin
S. Senthil Kumar6-Sep-05 2:46
S. Senthil Kumar6-Sep-05 2:46 
QuestionBase Class problem with forms Pin
Russell Jones6-Sep-05 0:34
Russell Jones6-Sep-05 0:34 
AnswerRe: Base Class problem with forms Pin
S. Senthil Kumar6-Sep-05 2:00
S. Senthil Kumar6-Sep-05 2:00 
GeneralRe: Base Class problem with forms Pin
Russell Jones6-Sep-05 2:33
Russell Jones6-Sep-05 2:33 
QuestionThreading and Forms Pin
Dani Duran Kenobi6-Sep-05 0:33
Dani Duran Kenobi6-Sep-05 0:33 
AnswerRe: Threading and Forms Pin
S. Senthil Kumar6-Sep-05 2:04
S. Senthil Kumar6-Sep-05 2:04 
QuestionControl Problems? Pin
Simon Wren5-Sep-05 23:36
professionalSimon Wren5-Sep-05 23:36 
AnswerRe: Control Problems? Pin
S. Senthil Kumar6-Sep-05 2:12
S. Senthil Kumar6-Sep-05 2:12 
GeneralRe: Control Problems? Pin
Simon Wren6-Sep-05 2:14
professionalSimon Wren6-Sep-05 2:14 
Questioncan i access my lan pc from out side lan using remoting Pin
Mayank Chauhan5-Sep-05 23:33
Mayank Chauhan5-Sep-05 23:33 

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.