Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: Data from text box Pin
sajid.salim.khan21-Sep-07 15:11
sajid.salim.khan21-Sep-07 15:11 
GeneralRe: Data from text box Pin
Chintan.Desai21-Sep-07 20:36
Chintan.Desai21-Sep-07 20:36 
QuestionNUnit - Run all unit tests for a specific namespace Pin
Polymorpher21-Sep-07 9:29
Polymorpher21-Sep-07 9:29 
QuestionHow to get cell value in gridView Pin
ss.mmm21-Sep-07 9:15
ss.mmm21-Sep-07 9:15 
AnswerRe: How to get cell value in gridView Pin
George L. Jackson21-Sep-07 12:25
George L. Jackson21-Sep-07 12:25 
QuestionTooltip Pin
babbelfisken21-Sep-07 9:08
babbelfisken21-Sep-07 9:08 
AnswerRe: Tooltip Pin
Chintan.Desai21-Sep-07 20:39
Chintan.Desai21-Sep-07 20:39 
QuestionThreading questions/advice sought Pin
martin_hughes21-Sep-07 8:55
martin_hughes21-Sep-07 8:55 
I've done some googling, but haven't turned up any answers to my questions - can anyone help?

1) My application reads comma delimited records from a file. The read and split is very fast indeed, but after they've been read I need to create objects out of the records, do some validation etc. etc. This can take a while to complete for large record sets. Aha, says I, multiple threads can speed this up.

My plan is to have one thread read the file and then place the returned string array in to a queue. Then as many worker threads as needed can dequeue an individual array in the queue and go off to do its work.

First up - is this a sensible approach, or is it a real stinker of an idea and are there better ways to achieve the same?

2) Is dequeuing thread safe, or could two threads attempt to dequeue the same item in the queue?

3) Are there any guidlines on the number of threads one should spawn for a given processor type? My PC has a Quad Core in it, which I assume means that things really can happen concurrently. My users, however, may well be limited to single core processors which I think will mean that the threads will share processor time - could too many threads in this situation lead to much slower performance as they all vie for time?

Thanks.


Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!

-Excerpt from a support call taken by me, 08/31/2007

AnswerRe: Threading questions/advice sought Pin
Pete O'Hanlon21-Sep-07 9:17
mvePete O'Hanlon21-Sep-07 9:17 
GeneralRe: Threading questions/advice sought Pin
martin_hughes21-Sep-07 9:35
martin_hughes21-Sep-07 9:35 
AnswerRe: Threading questions/advice sought Pin
led mike21-Sep-07 9:48
led mike21-Sep-07 9:48 
QuestionPrinting and Formatting [modified] Pin
Michael Fritzius21-Sep-07 8:31
professionalMichael Fritzius21-Sep-07 8:31 
AnswerRe: Printing and Formatting Pin
Pete O'Hanlon21-Sep-07 9:26
mvePete O'Hanlon21-Sep-07 9:26 
GeneralRe: Printing and Formatting Pin
Luc Pattyn21-Sep-07 12:22
sitebuilderLuc Pattyn21-Sep-07 12:22 
AnswerRe: Printing and Formatting Pin
Michael Fritzius24-Sep-07 4:51
professionalMichael Fritzius24-Sep-07 4:51 
QuestionWindows Shutdown Pin
mobius11100121-Sep-07 5:56
mobius11100121-Sep-07 5:56 
AnswerRe: Windows Shutdown [modified] Pin
Anthony Mushrow21-Sep-07 6:21
professionalAnthony Mushrow21-Sep-07 6:21 
GeneralRe: Windows Shutdown Pin
Dave Kreskowiak21-Sep-07 6:36
mveDave Kreskowiak21-Sep-07 6:36 
GeneralRe: Windows Shutdown Pin
Anthony Mushrow21-Sep-07 6:48
professionalAnthony Mushrow21-Sep-07 6:48 
AnswerRe: Windows Shutdown Pin
Dave Kreskowiak21-Sep-07 6:34
mveDave Kreskowiak21-Sep-07 6:34 
AnswerRe: Windows Shutdown Pin
Matthew Cuba21-Sep-07 6:39
Matthew Cuba21-Sep-07 6:39 
QuestionArrhgg.. C++ DLLs make me angry.. [modified] Pin
Dio2221-Sep-07 5:40
Dio2221-Sep-07 5:40 
AnswerRe: Arrhgg.. C++ DLLs make me angry.. Pin
Paul Conrad21-Sep-07 16:46
professionalPaul Conrad21-Sep-07 16:46 
GeneralRe: Arrhgg.. C++ DLLs make me angry.. Pin
Dio2221-Sep-07 17:16
Dio2221-Sep-07 17:16 
AnswerRe: Arrhgg.. C++ DLLs make me angry.. Pin
Paul Conrad22-Sep-07 4:58
professionalPaul Conrad22-Sep-07 4:58 

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.