Click here to Skip to main content
15,893,161 members
Home / Discussions / C#
   

C#

 
QuestionHow to get enum as parameter thru interface Pin
MichCl6-Dec-12 4:00
MichCl6-Dec-12 4:00 
AnswerRe: How to get enum as parameter thru interface Pin
DaveyM696-Dec-12 4:08
professionalDaveyM696-Dec-12 4:08 
AnswerRe: How to get enum as parameter thru interface Pin
PIEBALDconsult6-Dec-12 4:55
mvePIEBALDconsult6-Dec-12 4:55 
QuestionWhat would be the best approach for screen sharing c# Pin
Tridip Bhattacharjee5-Dec-12 21:00
professionalTridip Bhattacharjee5-Dec-12 21:00 
AnswerRe: What would be the best approach for screen sharing c# Pin
Eddy Vluggen6-Dec-12 5:28
professionalEddy Vluggen6-Dec-12 5:28 
GeneralRe: What would be the best approach for screen sharing c# Pin
Tridip Bhattacharjee6-Dec-12 19:54
professionalTridip Bhattacharjee6-Dec-12 19:54 
GeneralRe: What would be the best approach for screen sharing c# Pin
Eddy Vluggen7-Dec-12 1:20
professionalEddy Vluggen7-Dec-12 1:20 
QuestionExtending OpenFileDialog to select folder and file simultaneously Pin
hemant.4oct5-Dec-12 19:57
hemant.4oct5-Dec-12 19:57 
AnswerRe: Extending OpenFileDialog to select folder and file simultaneously Pin
Richard MacCutchan5-Dec-12 21:41
mveRichard MacCutchan5-Dec-12 21:41 
GeneralRe: Extending OpenFileDialog to select folder and file simultaneously Pin
hemant.4oct5-Dec-12 22:16
hemant.4oct5-Dec-12 22:16 
GeneralRe: Extending OpenFileDialog to select folder and file simultaneously Pin
Eddy Vluggen6-Dec-12 2:28
professionalEddy Vluggen6-Dec-12 2:28 
GeneralRe: Extending OpenFileDialog to select folder and file simultaneously Pin
Richard MacCutchan6-Dec-12 2:45
mveRichard MacCutchan6-Dec-12 2:45 
Questionimage processing Pin
Bishwajit Nepali5-Dec-12 19:52
Bishwajit Nepali5-Dec-12 19:52 
AnswerRe: image processing Pin
Richard MacCutchan5-Dec-12 21:34
mveRichard MacCutchan5-Dec-12 21:34 
AnswerRe: image processing Pin
lukeer5-Dec-12 23:45
lukeer5-Dec-12 23:45 
QuestionHow to read data from crl file in C# Pin
Gramulos5-Dec-12 19:12
Gramulos5-Dec-12 19:12 
AnswerRe: How to read data from crl file in C# Pin
Richard MacCutchan5-Dec-12 21:32
mveRichard MacCutchan5-Dec-12 21:32 
AnswerRe: How to read data from crl file in C# Pin
Eddy Vluggen6-Dec-12 2:34
professionalEddy Vluggen6-Dec-12 2:34 
QuestionMultiThreading Pin
MAW305-Dec-12 17:49
MAW305-Dec-12 17:49 
AnswerRe: MultiThreading Pin
Dave Kreskowiak5-Dec-12 18:28
mveDave Kreskowiak5-Dec-12 18:28 
The benefit you get depends on your datasets and how they need to be processed. You have a couple of options for dividing the work up:

1) Each thread will handle its own dataset, processing each, by itself, from start to finish. The benefit you get is if you have more than one dataset being worked on at a time.

2) If your dataset can be worked on if you partition a dataset into smaller chunks, each thread can work on a small chunk of the data. Say your dataset has 100 items in it and each can be processed individually with no dependancies on the other items in the set. Partitioning the dataset means breaking the 100 items into groups of, say, 25 each. Then 4 threads could work on the same dataset, each processing 25 items seperate from the others.

In both cases, you're best benefit is usually obtained when the number of worker threads you create matches the number of cores in the CPU. So, if you have an Intel proc with 4 cores and 4 hyperthreads, you'll see 8 logical cores, so you can get away with 8 threads.

You can also look into the Task Parallel Library (pre .NET 4.0) to simplify this process greatly. If using .NET 4.0 or 4.5, the TPL is integrated into the .NET Framework. You don't have to install a seperate library to use it.

See the System.Threading.Tasks namespace documentation.

GeneralRe: MultiThreading Pin
MAW305-Dec-12 18:40
MAW305-Dec-12 18:40 
GeneralRe: MultiThreading Pin
Dave Kreskowiak6-Dec-12 1:45
mveDave Kreskowiak6-Dec-12 1:45 
Questionimage processing Pin
Bishwajit Nepali5-Dec-12 17:37
Bishwajit Nepali5-Dec-12 17:37 
AnswerRe: image processing Pin
Dave Kreskowiak5-Dec-12 18:17
mveDave Kreskowiak5-Dec-12 18:17 
AnswerRe: image processing Pin
Mycroft Holmes5-Dec-12 18:35
professionalMycroft Holmes5-Dec-12 18:35 

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.