Click here to Skip to main content
15,925,661 members
Home / Discussions / C#
   

C#

 
GeneralRe: User Input parameter question Pin
Richard MacCutchan24-Nov-09 2:49
mveRichard MacCutchan24-Nov-09 2:49 
GeneralRe: User Input parameter question Pin
spankyleo12324-Nov-09 4:48
spankyleo12324-Nov-09 4:48 
QuestionServer and multiple clients question Pin
Eduard Keilholz23-Nov-09 20:55
Eduard Keilholz23-Nov-09 20:55 
GeneralRe: Server and multiple clients question [modified] Pin
Tobias Schoenig24-Nov-09 3:12
Tobias Schoenig24-Nov-09 3:12 
GeneralRe: Server and multiple clients question Pin
Eduard Keilholz24-Nov-09 5:51
Eduard Keilholz24-Nov-09 5:51 
GeneralRe: Server and multiple clients question Pin
Tobias Schoenig24-Nov-09 6:05
Tobias Schoenig24-Nov-09 6:05 
Questioncomparing volatile integer Pin
manustone23-Nov-09 20:06
manustone23-Nov-09 20:06 
AnswerRe: comparing volatile integer Pin
Luc Pattyn23-Nov-09 22:16
sitebuilderLuc Pattyn23-Nov-09 22:16 
manustone wrote:
if it is thread safe...


yes it is.

reading means: any way to obtain the value
writing means: any way to set a new (or same) value

therefore a conditional test is a read, and myValue++; is a read and a write.


manustone wrote:
it is better to use Interlocked class approach?


depends on circumstances; with a simple value type, that can be entirely read in one CPU instruction, and when only one writer/producer is present, it is sufficient and Interlock is slower. In most if not all other cases, volatile is insufficient.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


GeneralRe: comparing volatile integer Pin
manustone23-Nov-09 22:32
manustone23-Nov-09 22:32 
GeneralRe: comparing volatile integer Pin
Luc Pattyn23-Nov-09 22:45
sitebuilderLuc Pattyn23-Nov-09 22:45 
GeneralRe: comparing volatile integer Pin
manustone23-Nov-09 23:45
manustone23-Nov-09 23:45 
GeneralRe: comparing volatile integer Pin
harold aptroot24-Nov-09 3:24
harold aptroot24-Nov-09 3:24 
GeneralRe: comparing volatile integer Pin
Luc Pattyn24-Nov-09 4:16
sitebuilderLuc Pattyn24-Nov-09 4:16 
GeneralRe: comparing volatile integer Pin
David Skelly24-Nov-09 6:22
David Skelly24-Nov-09 6:22 
AnswerRe: comparing volatile integer Pin
David Skelly23-Nov-09 22:45
David Skelly23-Nov-09 22:45 
GeneralRe: comparing volatile integer Pin
manustone23-Nov-09 23:44
manustone23-Nov-09 23:44 
GeneralRe: comparing volatile integer Pin
Luc Pattyn23-Nov-09 23:55
sitebuilderLuc Pattyn23-Nov-09 23:55 
AnswerSurprise! Pin
harold aptroot24-Nov-09 2:19
harold aptroot24-Nov-09 2:19 
GeneralRe: Surprise! Pin
manustone24-Nov-09 2:47
manustone24-Nov-09 2:47 
GeneralRe: Surprise! Pin
harold aptroot24-Nov-09 3:19
harold aptroot24-Nov-09 3:19 
Questioni have problem axShockwaveFlash1_OnProgress [modified] Pin
bekzod00923-Nov-09 19:14
bekzod00923-Nov-09 19:14 
AnswerRe: i have problem axShockwaveFlash1_OnProgress Pin
Richard MacCutchan23-Nov-09 21:52
mveRichard MacCutchan23-Nov-09 21:52 
QuestionLinq question, error I do not understand Pin
Calvin Bell23-Nov-09 12:49
Calvin Bell23-Nov-09 12:49 
AnswerRe: Linq question, error I do not understand Pin
Ravi Bhavnani23-Nov-09 13:49
professionalRavi Bhavnani23-Nov-09 13:49 
GeneralRe: Linq question, error I do not understand Pin
Calvin Bell24-Nov-09 2:49
Calvin Bell24-Nov-09 2:49 

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.