Click here to Skip to main content
15,880,608 members
Home / Discussions / C#
   

C#

 
AnswerRe: Saved file images Pin
Nick Parker6-Sep-05 8:44
protectorNick Parker6-Sep-05 8:44 
GeneralRe: Saved file images Pin
Jerry Hammond6-Sep-05 10:40
Jerry Hammond6-Sep-05 10:40 
QuestionWindows Services Pin
Member 19735946-Sep-05 4:39
Member 19735946-Sep-05 4:39 
QuestionClient/Server Communication Pin
batmanAgen6-Sep-05 4:35
batmanAgen6-Sep-05 4:35 
AnswerRe: Client/Server Communication Pin
John Fisher6-Sep-05 4:45
John Fisher6-Sep-05 4:45 
Questionweb.config Help Pin
Brendan Vogt6-Sep-05 3:25
Brendan Vogt6-Sep-05 3:25 
AnswerRe: web.config Help Pin
Mohamad Al Husseiny6-Sep-05 4:27
Mohamad Al Husseiny6-Sep-05 4:27 
QuestionBest practice with threads? Pin
6-Sep-05 3:13
suss6-Sep-05 3:13 
Hi guys & girls,
I've a problem with threads. I write a Windows Service which handles files. The processing can take some time, so I need to use threads, as some of the files have to be processes as fast and can not wait while other files are getting processed.

My application is designed as follows:

I've three modules. The first module reads and writes "internal" files. The third module reads and writes "external" files. The second modle converts the files, either internal or external, into the other format.

So when the first module gets a file, it gives an object representing the file to the second module, where the file is converted and then the second module gives the object to the third module where it is saved. For external files its the same, just the other way round.

So I thought about using either FileSystemWatcher or a Timer for checking for new files on both sides and then start a thread for each file. But with this the method calls will start in the first module and stop in the last.

So I thouhgt about a different approach. I could create some buffer between the modules and on each side of the buffer a thread looking for new files in the buffer. In the converter module, where the time consuming part takes place I could then start new threads for each file, but this threads would stay inside the module.

I just don't know which approach is better or maybe both of them are bullsh**, so could someone please give me some help with this? I want to create a clean application but I haven't worked much with threads and so I just don't know what would be better. With the second approach I could control the number of working threads better, but I'm just not shure if it is a good method, so please help me with that!

greetings

Stampede

-- modified at 9:20 Tuesday 6th September, 2005
AnswerRe: Best practice with threads? Pin
John Fisher6-Sep-05 4:36
John Fisher6-Sep-05 4:36 
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 

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.