Results 1 to 2 of 2

Thread: Doc: return value of RecMutex::tryLock()

  1. #1
    n2503v is offline Registered User
    Name: Alex Makarenko
    Organization: ACFR, University of Sydney
    Project: Orca
    Join Date
    Jun 2005
    Posts
    134

    Post Doc: return value of RecMutex::tryLock()

    What does RecMutex::tryLock() return when the mutex is already locked by the same thread? I assume it's FALSE but the manual seems to say something different.

    Manual sec. 29.5
    "The tryLock function works like lock, but, instead of blocking the caller, it returns false if the mutex is locked by another thread. Otherwise, the return value is true."

    RecMutex.h
    "Returns true if the lock was acquired, and false otherwise."
    Alex Makarenko
    Marathon Robotics
    project: multi-robot systems

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    The manual is correct, if the mutex is already locked by the calling thread tryLock() returns true. The comment in the header file is a bit misleading, it will be fixed!

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Minor online doc bug
    By ctennis in forum Bug Reports
    Replies: 1
    Last Post: 11-13-2007, 06:51 AM
  2. minor typo in doc
    By ctennis in forum Bug Reports
    Replies: 2
    Last Post: 03-28-2007, 12:28 PM
  3. ice api doc generated with doxygen
    By twoface in forum Comments
    Replies: 2
    Last Post: 10-05-2004, 11:08 PM
  4. Doc 1.0.2 remarks
    By manfred in forum Bug Reports
    Replies: 0
    Last Post: 05-21-2003, 03:10 AM
  5. portability problems with RecMutex ctor
    By marlowa in forum Patches
    Replies: 6
    Last Post: 02-23-2003, 03:45 PM

Posting Permissions

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