Do I need a mutex to access members from different threads?



Hello there,

currently I am working on a c# project with the .Net Compact Framwork.
I have to use two threads where one of them modifies a member of the
class in regular timed intervals. The "normal" (e.g. the first or
start or main thread :P) thread needs to read this data to display it.
So can this bring up some errors or problems (like asyncronous reading/
writing) and do I need a mutex for writing and reading the data from
different threads?
Are there any examples for this? I am relatively new to threads.

Thanks in advance
Tom
.



Relevant Pages

  • Re: Do I need a mutex to access members from different threads?
    ... currently I am working on a c# project with the .Net Compact Framwork. ... I have to use two threads where one of them modifies a member of the ... writing) and do I need a mutex for writing and reading the data from ...
    (microsoft.public.pocketpc.developer)
  • Re: New Berben Releases
    ... categories of composers, of course I did not refer to you in ... member of the category n. ... this in professional terms - as a music reader working for some ... publishers - and my duty would be accomplished with writing a report ...
    (rec.music.classical.guitar)
  • Re: _Magicians Ward_ revised (was Re: Revising a first novel ten years later)
    ... People who aren't writers have weird ideas about what writing is like. ... my typical work day, which he admitted to finding fairly ... grateful dues-paying member of AG ever since. ...
    (rec.arts.sf.composition)
  • Is there a todo list before writing a function ?
    ... In order to put some order in the process of writing a member ... by ref or by val ... how does it affect member variables ...
    (comp.lang.cpp)
  • Re: Do I need a mutex to access members from different threads?
    ... I have to use two threads where one of them modifies a member of the ... writing) and do I need a mutex for writing and reading the data from ... The solution with lock() seems to works - I ... But maybe I am missing something with those events. ...
    (microsoft.public.pocketpc.developer)

Loading