Click here to Skip to main content
15,902,860 members
Home / Discussions / C#
   

C#

 
GeneralRe: SSL samples and ServerCertificateValidationCallback Pin
George_George9-Aug-08 0:03
George_George9-Aug-08 0:03 
Questionrating of an artilcle in c# Pin
r aa j6-Aug-08 21:34
r aa j6-Aug-08 21:34 
AnswerRe: rating of an artilcle in c# Pin
Colin Angus Mackay6-Aug-08 23:07
Colin Angus Mackay6-Aug-08 23:07 
AnswerRe: rating of an artilcle in c# Pin
Manas Bhardwaj7-Aug-08 5:25
professionalManas Bhardwaj7-Aug-08 5:25 
GeneralGreat,,,,,,,,,,,,,, Pin
r aa j7-Aug-08 18:29
r aa j7-Aug-08 18:29 
Questioncheck for updates Button Pin
laziale6-Aug-08 20:33
laziale6-Aug-08 20:33 
AnswerRe: check for updates Button Pin
Programm3r6-Aug-08 20:45
Programm3r6-Aug-08 20:45 
QuestionThread Question Pin
Programm3r6-Aug-08 20:28
Programm3r6-Aug-08 20:28 
Hi all,

I would like to know whether the following would be wise or not:

Seeing that 'System.Threading.Thread.Suspend()' is obsolete, I want to create two threads and declare an enumeration to store some thread states (not referring to ThreadState). I.E:
public struct THREAD_STATUS
{
    public int threadWorking;
    public int threadSleeping;
}

When the one thread wants to do some processing, it first check the state of the other thread before proceeding. Should the state be in threadSleeping state the one thread puts the other one in a Suspend state and can continue processing, thus the following can be prevented:

A thread may be performing a system-wide-synchronized operation like locking a range of bytes in a file, writing to those bytes, unlocking those bytes, then closing the file. A thread is suspended before the unlock, that range of bytes will remain locked for an indeterminate amount of time until the thread is resumed or the process terminates

Will this be a good approach?
Many thanks in advance
Regards,



The only programmers that are better that C programmers are those who code in 1's and 0's Green Alien | [Alien]


Smile | :) Programm3r

My Blog: ^_^

AnswerRe: Thread Question Pin
MarkB7776-Aug-08 21:19
MarkB7776-Aug-08 21:19 
QuestionRe: Thread Question Pin
Programm3r6-Aug-08 21:52
Programm3r6-Aug-08 21:52 
AnswerRe: Thread Question Pin
GeorgeBerry7-Aug-08 0:43
GeorgeBerry7-Aug-08 0:43 
AnswerRe: Thread Question Pin
MarkB7776-Aug-08 23:36
MarkB7776-Aug-08 23:36 
QuestionThe .Net C# Give Me the Exeption For Serialisation Pin
Thaer Hamael6-Aug-08 19:53
Thaer Hamael6-Aug-08 19:53 
AnswerRe: The .Net C# Give Me the Exeption For Serialisation Pin
stancrm6-Aug-08 20:17
stancrm6-Aug-08 20:17 
GeneralRe: The .Net C# Give Me the Exeption For Serialisation Pin
Thaer Hamael6-Aug-08 20:24
Thaer Hamael6-Aug-08 20:24 
GeneralRe: The .Net C# Give Me the Exeption For Serialisation Pin
Thaer Hamael6-Aug-08 20:24
Thaer Hamael6-Aug-08 20:24 
GeneralRe: The .Net C# Give Me the Exeption For Serialisation Pin
leppie6-Aug-08 22:33
leppie6-Aug-08 22:33 
QuestionRead null value(s) from cell of DataGridView Pin
M Riaz Bashir6-Aug-08 19:52
M Riaz Bashir6-Aug-08 19:52 
AnswerRe: Read null value(s) from cell of DataGridView Pin
Judah Gabriel Himango6-Aug-08 19:58
sponsorJudah Gabriel Himango6-Aug-08 19:58 
GeneralRe: Read null value(s) from cell of DataGridView Pin
M Riaz Bashir6-Aug-08 20:10
M Riaz Bashir6-Aug-08 20:10 
GeneralRe: Read null value(s) from cell of DataGridView Pin
Kjetil Svendsen6-Aug-08 22:17
Kjetil Svendsen6-Aug-08 22:17 
GeneralRe: Read null value(s) from cell of DataGridView Pin
leppie7-Aug-08 3:09
leppie7-Aug-08 3:09 
GeneralRe: Read null value(s) from cell of DataGridView Pin
leppie7-Aug-08 2:58
leppie7-Aug-08 2:58 
QuestionGet Default Printer name Pin
magy6-Aug-08 19:50
magy6-Aug-08 19:50 
AnswerRe: Get Default Printer name Pin
Judah Gabriel Himango6-Aug-08 19:57
sponsorJudah Gabriel Himango6-Aug-08 19:57 

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.