CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Location
    Akron, Ohio
    Posts
    670

    Thread Lock conundrum

    Suppose thread 1 creates a lock dynamically (but does not lock it). Then, suppose Thread 2 locks the lock, then goes out of existence. Will thread 1 be able to delete the lock since it was left locked by the now non-existent thread 2?
    error C2146a : syntax error : nebulizer stained in the tower floppy apple rider. Go rubble in flee smite. Bleeble snip snip.

    Documentation says: error C2146a - This means there is an error somewhere in the course of human endeavor. Fix in the usual way.

  2. #2
    Join Date
    Jan 2009
    Posts
    1,689

    Re: Thread Lock conundrum

    No. A locked pthread_mutex_t can not be destroyed. In fact, your program shouldn't even be able to close correctly. If you are using another threading library, then you'll have to check the docs.

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