Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
AnswerRe: Image in XML file Pin
Mirko19805-Nov-08 22:07
Mirko19805-Nov-08 22:07 
QuestionSQL Server Express - How many querys per a second can it handle? Pin
Brad Wick5-Nov-08 12:52
Brad Wick5-Nov-08 12:52 
AnswerRe: SQL Server Express - How many querys per a second can it handle? Pin
Ashfield5-Nov-08 21:16
Ashfield5-Nov-08 21:16 
QuestionNot Getting Data Back From Stored Proc Call Pin
Kevin Marois5-Nov-08 10:28
professionalKevin Marois5-Nov-08 10:28 
AnswerRe: Not Getting Data Back From Stored Proc Call Pin
KaptinKrunch5-Nov-08 10:42
KaptinKrunch5-Nov-08 10:42 
AnswerRe: Not Getting Data Back From Stored Proc Call Pin
Ashfield5-Nov-08 21:26
Ashfield5-Nov-08 21:26 
Questionwaiting for multiple threads Pin
invictus35-Nov-08 10:24
invictus35-Nov-08 10:24 
AnswerRe: waiting for multiple threads Pin
Nicholas Butler5-Nov-08 11:35
sitebuilderNicholas Butler5-Nov-08 11:35 
If your worker threads are terminating after they have done their work, you can just use Thread.Join on each one from your main thread.

If they stay around in a loop, waiting for the next batch of work, then you need a Barrier ( not a memory barrier - that's something different ). As it happens, I've just been playing with the new Barrier class in .NET 4.0, but I guess that doesn't help you much Smile | :)

The easiest way to implement this at the moment, is to have an int that you set to your numthreads before you start the threads. When each thread finishes its work, it calls Interlocked.Decrement and if it is the last thread, it signals an AutoResetEvent that the main thread is waiting on.

Nick

----------------------------------
Be excellent to each other Smile | :)

QuestionAccessing a static variable Pin
Member 41431915-Nov-08 8:46
Member 41431915-Nov-08 8:46 
AnswerRe: Accessing a static variable Pin
User 66585-Nov-08 9:41
User 66585-Nov-08 9:41 
GeneralRe: Accessing a static variable Pin
Member 41431915-Nov-08 10:25
Member 41431915-Nov-08 10:25 
QuestionHow to compare custom objects in a Dictionary<> Pin
ret76795-Nov-08 8:24
ret76795-Nov-08 8:24 
AnswerRe: How to compare custom objects in a Dictionary<> Pin
User 66585-Nov-08 9:50
User 66585-Nov-08 9:50 
GeneralRe: How to compare custom objects in a Dictionary<> Pin
ret76796-Nov-08 5:27
ret76796-Nov-08 5:27 
GeneralRe: How to compare custom objects in a Dictionary<> Pin
User 66586-Nov-08 10:25
User 66586-Nov-08 10:25 
Questiondeleting data from a database Pin
postonoh5-Nov-08 7:25
postonoh5-Nov-08 7:25 
QuestionRe: deleting data from a database Pin
Le centriste5-Nov-08 8:33
Le centriste5-Nov-08 8:33 
GeneralRe: deleting data from a database Pin
Guffa5-Nov-08 9:17
Guffa5-Nov-08 9:17 
GeneralRe: deleting data from a database Pin
Le centriste5-Nov-08 9:35
Le centriste5-Nov-08 9:35 
AnswerRe: deleting data from a database Pin
Guffa5-Nov-08 9:37
Guffa5-Nov-08 9:37 
GeneralRe: deleting data from a database Pin
postonoh5-Nov-08 9:42
postonoh5-Nov-08 9:42 
QuestionGetting application Icon Pin
Dirso5-Nov-08 7:16
Dirso5-Nov-08 7:16 
AnswerRe: Getting application Icon Pin
Colin Angus Mackay5-Nov-08 7:22
Colin Angus Mackay5-Nov-08 7:22 
GeneralRe: Getting application Icon Pin
Dirso5-Nov-08 7:35
Dirso5-Nov-08 7:35 
AnswerRe: Getting application Icon Pin
Henry Minute5-Nov-08 9:50
Henry Minute5-Nov-08 9:50 

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.