Click here to Skip to main content
15,921,697 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: How to read a exact word in a text file using c# Pin
Pete O'Hanlon22-Dec-06 0:29
mvePete O'Hanlon22-Dec-06 0:29 
AnswerRe: How to read a exact word in a text file using c# Pin
gnadeem23-Dec-06 8:27
gnadeem23-Dec-06 8:27 
QuestionNET remoting Pin
vanolviv21-Dec-06 22:36
vanolviv21-Dec-06 22:36 
AnswerRe: NET remoting Pin
vanolviv22-Dec-06 0:51
vanolviv22-Dec-06 0:51 
QuestionReaderWriterLock [modified] Pin
Hendrik Debedts21-Dec-06 10:03
Hendrik Debedts21-Dec-06 10:03 
QuestionNET remoting Pin
vanolviv21-Dec-06 4:01
vanolviv21-Dec-06 4:01 
AnswerRe: NET remoting Pin
vanolviv21-Dec-06 4:57
vanolviv21-Dec-06 4:57 
Questionhow to load the previously hidden form in C# Pin
NK721-Dec-06 0:28
NK721-Dec-06 0:28 
AnswerRe: how to load the previously hidden form in C# Pin
Keith Malwitz21-Dec-06 2:02
Keith Malwitz21-Dec-06 2:02 
GeneralRe: how to load the previously hidden form in C# Pin
Christian Graus21-Dec-06 19:40
protectorChristian Graus21-Dec-06 19:40 
QuestionList.BinarySearch results... Pin
Paul Selormey20-Dec-06 23:55
Paul Selormey20-Dec-06 23:55 
AnswerRe: List.BinarySearch results... Pin
Pete O'Hanlon21-Dec-06 0:54
mvePete O'Hanlon21-Dec-06 0:54 
GeneralRe: List.BinarySearch results... Pin
Paul Selormey21-Dec-06 19:33
Paul Selormey21-Dec-06 19:33 
AnswerRe: List.BinarySearch results.. Pin
Tarakeshwar Reddy21-Dec-06 0:58
professionalTarakeshwar Reddy21-Dec-06 0:58 
GeneralRe: List.BinarySearch results.. Pin
Paul Selormey21-Dec-06 19:34
Paul Selormey21-Dec-06 19:34 
Questionis the dataview being updated as I modify it? Pin
JoeRip20-Dec-06 23:29
JoeRip20-Dec-06 23:29 
AnswerRe: is the dataview being updated as I modify it? Pin
JoeRip21-Dec-06 10:44
JoeRip21-Dec-06 10:44 
QuestionHow do I handle events for dropdown menu items created on the fly? Pin
JoeRip20-Dec-06 20:43
JoeRip20-Dec-06 20:43 
AnswerRe: How do I handle events for dropdown menu items created on the fly? Pin
Tarakeshwar Reddy20-Dec-06 21:11
professionalTarakeshwar Reddy20-Dec-06 21:11 
GeneralRe: How do I handle events for dropdown menu items created on the fly? Pin
JoeRip20-Dec-06 21:21
JoeRip20-Dec-06 21:21 
GeneralRe: How do I handle events for dropdown menu items created on the fly? Pin
Tarakeshwar Reddy20-Dec-06 21:30
professionalTarakeshwar Reddy20-Dec-06 21:30 
GeneralRe: How do I handle events for dropdown menu items created on the fly? Pin
JoeRip20-Dec-06 21:49
JoeRip20-Dec-06 21:49 
GeneralRe: How do I handle events for dropdown menu items created on the fly? Pin
Tarakeshwar Reddy20-Dec-06 22:00
professionalTarakeshwar Reddy20-Dec-06 22:00 
QuestionSharing data across threads Pin
Hendrik Debedts20-Dec-06 4:09
Hendrik Debedts20-Dec-06 4:09 
AnswerRe: Sharing data across threads Pin
Keith Malwitz20-Dec-06 6:03
Keith Malwitz20-Dec-06 6:03 
The potential problem on a hyperthreaded or multi-processor PC is due to the fact that each processor in a PC maintains its own cache. Therefore, if any of the threads executing in your routine happen to run on a different processor, that processor updates its own cache and does not automatically publish the new value to the other processor. This would cause your counter to 'miss' that particular iteration of the counter.

There are several potential solutions to get around this, for instance using the VolatileRead and VolatileWrite methods of the Thread class (these use shared memory that all processor's can access, rather than storing the value of your variable in a CPU register) or using the MemoryBarrier of the Thread class (this method flushes the caches and CPU registers of all the processors into memory, ensuring that variables contain current data). You can get plenty of info on the Thread class and it's methods on the MSDN website.

Hope that helps.

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.