Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
JoeRip20-Aug-08 15:52
JoeRip20-Aug-08 15:52 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Mark Churchill20-Aug-08 17:53
Mark Churchill20-Aug-08 17:53 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
JoeRip20-Aug-08 18:08
JoeRip20-Aug-08 18:08 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Christian Graus20-Aug-08 19:36
protectorChristian Graus20-Aug-08 19:36 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
N a v a n e e t h20-Aug-08 20:28
N a v a n e e t h20-Aug-08 20:28 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Mark Churchill21-Aug-08 5:31
Mark Churchill21-Aug-08 5:31 
AnswerRe: Does Boolean not need an Interlocked.Exchange method? Pin
Daniel Grunwald21-Aug-08 0:45
Daniel Grunwald21-Aug-08 0:45 
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
JoeRip21-Aug-08 2:31
JoeRip21-Aug-08 2:31 
Daniel Grunwald wrote:
However, if you use the boolean for things like "run this code only once", then you have to lock/use Interlocked.CompareExchange to ensure that only the first thread to set the boolean to true runs the "run only once" code.


Remember that there is no Interlocked.CompareExchange for boolean types. You can use an INT and treat it like a boolean, but that's pretty inelegant.

Oddly enough, Microsoft has repeatedly chosen not to support booleans in the Interlocked methods, despite the many requests I found in their forums/Connection Feedbacks.
GeneralRe: Does Boolean not need an Interlocked.Exchange method? Pin
Daniel Grunwald21-Aug-08 2:39
Daniel Grunwald21-Aug-08 2:39 
Questionftp server - client question here Pin
AndreasAlex20-Aug-08 14:56
AndreasAlex20-Aug-08 14:56 
AnswerRe: ftp server - client question here Pin
AndreasAlex20-Aug-08 14:59
AndreasAlex20-Aug-08 14:59 
QuestionHow to programatically manipulate forms authentication settings of web.config file Pin
tjkota20-Aug-08 11:46
tjkota20-Aug-08 11:46 
AnswerRe: How to programatically manipulate forms authentication settings of web.config file Pin
Christian Graus20-Aug-08 15:49
protectorChristian Graus20-Aug-08 15:49 
QuestionCreated Web Proxy but can't return images..C# Pin
DeepToot20-Aug-08 9:20
DeepToot20-Aug-08 9:20 
AnswerRe: Created Web Proxy but can't return images..C# Pin
DeepToot21-Aug-08 4:11
DeepToot21-Aug-08 4:11 
QuestionMDI; Finding a property on parent from MDI child form Pin
ianhunt0120-Aug-08 9:02
ianhunt0120-Aug-08 9:02 
AnswerRe: MDI; Finding a property on parent from MDI child form Pin
Mark Miller20-Aug-08 9:32
Mark Miller20-Aug-08 9:32 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0120-Aug-08 20:18
ianhunt0120-Aug-08 20:18 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
Mark Miller21-Aug-08 9:44
Mark Miller21-Aug-08 9:44 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0121-Aug-08 21:22
ianhunt0121-Aug-08 21:22 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
Mark Miller23-Aug-08 14:46
Mark Miller23-Aug-08 14:46 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0124-Aug-08 21:15
ianhunt0124-Aug-08 21:15 
AnswerRe: MDI; Finding a property on parent from MDI child form Pin
led mike20-Aug-08 9:33
led mike20-Aug-08 9:33 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
ianhunt0120-Aug-08 20:16
ianhunt0120-Aug-08 20:16 
GeneralRe: MDI; Finding a property on parent from MDI child form Pin
led mike21-Aug-08 6:44
led mike21-Aug-08 6:44 

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.