Click here to Skip to main content
15,909,193 members
Home / Discussions / C#
   

C#

 
QuestionHow do you use SocketOptionName.BlockSource Pin
Zig15830-May-08 17:34
Zig15830-May-08 17:34 
QuestionFunction name under execution Pin
Imtiaz Murtaza30-May-08 14:38
Imtiaz Murtaza30-May-08 14:38 
AnswerRe: Function name under execution Pin
MidwestLimey30-May-08 16:57
professionalMidwestLimey30-May-08 16:57 
AnswerRe: Function name under execution Pin
Roger Alsing30-May-08 23:01
Roger Alsing30-May-08 23:01 
Questioninsert byte[] in a file Pin
Xmen Real 30-May-08 14:14
professional Xmen Real 30-May-08 14:14 
AnswerRe: insert byte[] in a file Pin
Anthony Mushrow30-May-08 14:34
professionalAnthony Mushrow30-May-08 14:34 
GeneralRe: insert byte[] in a file Pin
Xmen Real 30-May-08 18:52
professional Xmen Real 30-May-08 18:52 
QuestionMultiThreading\Design Question Pin
DavidBoyd30-May-08 13:36
DavidBoyd30-May-08 13:36 
Hi!
This is what i have so far...


foreach (string result in Ldap.Query(filtertext))
{
ThreadStart starter = delegate { NetInfo.Resolve(result, out ipResult); };
Thread t = new Thread(starter);
t.Start();
while (t.ThreadState.ToString() == "Running")
{

Thread.Sleep(50);
}
}

The problem in my mind is that i'm making the UI thread sleep... this ties up the UI and seeing as how i started trying to integrate multi-threading to stop something like this and increase the speed at which i can ping other machine's and return there address assuming they are up. What should i do because i need alot of the values off the UI and i'd still like to not tie up the UI i've been reading a bit about using a threadpool i'm not sure if that would be faster or not... The other problem that i'm running into is that i have to pull a bunch of values off the form and then obviously i need to put other values back on the form in a listview. I was thinking that i could start a new thread that starts all the threads that pulls all the values back and then stores them into something like a arraylist and pushes the values back to the form... is this a good idea? or should i just forget about multi threading? I hope this isn't to muddled up and is clear enough for people to understand if you need further clarification lemme know... Smile | :)

I know the human being and fish can coexist peacefully. -George Dubya Bush

Don't believe me?
http://politicalhumor.about.com/library/blbushism-fish.htm

Yes thats right he actually said that...
AnswerRe: MultiThreading\Design Question Pin
RichardM130-May-08 15:31
RichardM130-May-08 15:31 
AnswerRe: MultiThreading\Design Question Pin
engsrini31-May-08 12:51
engsrini31-May-08 12:51 
QuestionDisplaying an ASCII value in a dynamic GridView Pin
Ekjon30-May-08 12:43
Ekjon30-May-08 12:43 
AnswerRe: Displaying an ASCII value in a dynamic GridView Pin
Ekjon30-May-08 12:52
Ekjon30-May-08 12:52 
Question[Message Deleted] Pin
Zeeshan Riaz30-May-08 10:34
Zeeshan Riaz30-May-08 10:34 
AnswerRe: Copy Constructor Pin
#realJSOP30-May-08 10:39
professional#realJSOP30-May-08 10:39 
AnswerRe: Copy Constructor Pin
MarkB77730-May-08 13:42
MarkB77730-May-08 13:42 
AnswerRe: Copy Constructor Pin
Bert delaVega30-May-08 15:06
Bert delaVega30-May-08 15:06 
AnswerCP IGNORE Pin
leckey30-May-08 18:17
leckey30-May-08 18:17 
Question[Message Deleted] Pin
Zeeshan Riaz30-May-08 10:32
Zeeshan Riaz30-May-08 10:32 
AnswerRe: Generalization Pin
Guffa30-May-08 13:50
Guffa30-May-08 13:50 
AnswerDO YOUR OWN HOMEWORK Pin
leckey30-May-08 18:16
leckey30-May-08 18:16 
Question[Message Deleted] Pin
Zeeshan Riaz30-May-08 10:30
Zeeshan Riaz30-May-08 10:30 
AnswerRe: Reflection Pin
#realJSOP30-May-08 10:40
professional#realJSOP30-May-08 10:40 
GeneralRe: Reflection Pin
Pete O'Hanlon30-May-08 10:45
mvePete O'Hanlon30-May-08 10:45 
AnswerRe: Reflection Pin
MarkB77730-May-08 13:38
MarkB77730-May-08 13:38 
AnswerRe: Reflection Pin
engsrini31-May-08 12:46
engsrini31-May-08 12:46 

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.