Click here to Skip to main content
16,013,605 members
Home / Discussions / C#
   

C#

 
AnswerRe: Plz help me Pin
Abhinav S22-May-10 22:20
Abhinav S22-May-10 22:20 
Generalthis chunck of code have same results Pin
dia 201023-May-10 1:26
dia 201023-May-10 1:26 
AnswerRe: Plz help me Pin
Not Active23-May-10 3:38
mentorNot Active23-May-10 3:38 
Generalgetting ip address of client on server side Pin
dia 201023-May-10 18:53
dia 201023-May-10 18:53 
QuestionHow to include in installer Access Database 2003.? Pin
joynil22-May-10 17:51
joynil22-May-10 17:51 
AnswerRe: How to include in installer Access Database 2003.? Pin
PIEBALDconsult23-May-10 7:08
mvePIEBALDconsult23-May-10 7:08 
QuestionWhats iS THE Problem Of MY code in Monitor class For Resolve of Race Condition Pin
shahramkeyboard22-May-10 11:26
shahramkeyboard22-May-10 11:26 
AnswerRe: Whats iS THE Problem Of MY code in Monitor class For Resolve of Race Condition Pin
Luc Pattyn22-May-10 11:49
sitebuilderLuc Pattyn22-May-10 11:49 
Hi,

I haven't studied that in any detail, I do have a few comments though:

1.
you have a Monitor.Exit inside a for loop, whereas the Monitor.Enter is executed only once? That means most of the loop is not protected by the monitor.

2.
Thread.Sleep() takes an integer parameter representing the requested delay in milliseconds. However, its resolution is really system-dependent, and never that good. It typically will round up to a multiple of some 15 milliseconds. If you want details, I suggest you read Timer surprises, and how to avoid them[^].

3.
Rather than constructing a poll loop to wait for the end of one or more threads, I suggest you read up on Thread.Join()


Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

Questionuse of ? and : [Solved] Pin
William Winner22-May-10 11:22
William Winner22-May-10 11:22 
AnswerRe: use of ? and : Pin
Pete O'Hanlon22-May-10 11:27
mvePete O'Hanlon22-May-10 11:27 
GeneralRe: use of ? and : Pin
William Winner22-May-10 11:30
William Winner22-May-10 11:30 
GeneralRe: use of ? and : Pin
Pete O'Hanlon22-May-10 11:33
mvePete O'Hanlon22-May-10 11:33 
GeneralRe: use of ? and : Pin
#realJSOP23-May-10 2:00
professional#realJSOP23-May-10 2:00 
AnswerRe: use of ? and : [Solved] Pin
DaveyM6923-May-10 1:20
professionalDaveyM6923-May-10 1:20 
Questionhelp to translate label from dll on C# Pin
kozzzak22-May-10 11:14
kozzzak22-May-10 11:14 
AnswerRe: help to translate label from dll on C# [modified] Pin
Luc Pattyn22-May-10 11:43
sitebuilderLuc Pattyn22-May-10 11:43 
QuestionPeterson Algoritm For many Process Pin
shahramkeyboard22-May-10 10:34
shahramkeyboard22-May-10 10:34 
AnswerRe: Peterson Algoritm For many Process Pin
Pete O'Hanlon22-May-10 10:45
mvePete O'Hanlon22-May-10 10:45 
GeneralRe: Peterson Algoritm For many Process Pin
shahramkeyboard22-May-10 11:27
shahramkeyboard22-May-10 11:27 
GeneralRe: Peterson Algoritm For many Process Pin
Pete O'Hanlon22-May-10 11:33
mvePete O'Hanlon22-May-10 11:33 
QuestionSimulation Of TSL instruction For Resolve of Race Condition Pin
shahramkeyboard22-May-10 10:25
shahramkeyboard22-May-10 10:25 
AnswerRe: Simulation Of TSL instruction For Resolve of Race Condition Pin
Pete O'Hanlon22-May-10 10:44
mvePete O'Hanlon22-May-10 10:44 
GeneralRe: Simulation Of TSL instruction For Resolve of Race Condition Pin
shahramkeyboard22-May-10 11:28
shahramkeyboard22-May-10 11:28 
GeneralRe: Simulation Of TSL instruction For Resolve of Race Condition Pin
Pete O'Hanlon22-May-10 11:38
mvePete O'Hanlon22-May-10 11:38 
QuestionCan I store List<> in a SQL DB? Pin
Etienne_12322-May-10 8:58
Etienne_12322-May-10 8: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.