CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    12

    Waiting for threads

    Hi.
    Im having a problem and can't find a solution.

    The problem happens when i WaitForSingleObject (or multiple).
    Im waiting for a thread to terminate, but even after the thread ends, the program blocks on WaitForSingleObject.

    I have tried creating a small program to test things and it works ok, but its not working with my real thread. (Even if my real thread ends correctly )

    So, the question is, is there any pre-requisite to WaitForSingleObject to work?

    PS: My real thread uses mutex for some stuff, but since it ends correctly(releasing the mutex), i don't think my problem is because of some kind of deadlock.

    Thanks in advance.
    Last edited by stratoforce; June 30th, 2009 at 02:45 AM. Reason: edited: wrong forum, im really sorry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured