CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: RwAA23

Search: Search took 0.03 seconds.

  1. Replies
    13
    Views
    12,846

    Re: consequences of race condition

    Thanks to everyone, I really enjoyed this discussion and I fully agree that failure to protect shared variables is normally bad form, sloppy and / or lazy. That can lead to "dangerous" situations...
  2. Replies
    13
    Views
    12,846

    Re: consequences of race condition

    Codeplug, thanks for the post.

    For the value of x, I think I can put it to rest. Without synchro, the value can be anything at any given time.

    Arjay,

    Just one last question, could you...
  3. Replies
    13
    Views
    12,846

    Re: consequences of race condition

    Ok, thanks again for the posts. I get the feeling that I'm going wrong somewhere and if anybody has the patience to go back to basics to find out where, please let me know.

    I start with x=x+1...
  4. Replies
    13
    Views
    12,846

    Re: consequences of race condition

    Thank you for your replies.

    I have a good understanding of the system objects available to protect the counter variable above. This example comes from a larger system. Adding one line of code,...
  5. Replies
    13
    Views
    12,846

    consequences of race condition

    Hello everyone, I'm new here and would like your thoughts on the following 'code' snippet with two followup questions

    static int x=0;

    int main()
    {
    new thread1();

    while 1
    {
Results 1 to 5 of 5





Click Here to Expand Forum to Full Width

Featured