From ccb7db2ee35b8efb0030283856a9b9f5a1ff419d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 22 Apr 2013 07:53:36 -0700 Subject: Document that the mutex passed to QWaitCondition::wait must be locked Simply say that the behaviour is undefined if you don't do what you must do. I don't want to introduce a check: it can't be done reliably anyway. Task-number: QTBUG-30806 Change-Id: Iba1bbbdfe62ffcb133f9c52215efdcc0ee7bd9bd Reviewed-by: Olivier Goffart --- src/corelib/thread/qwaitcondition.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc index 68788e0b3f..9aa633a210 100644 --- a/src/corelib/thread/qwaitcondition.qdoc +++ b/src/corelib/thread/qwaitcondition.qdoc @@ -124,8 +124,8 @@ Releases the \a lockedMutex and waits on the wait condition. The \a lockedMutex must be initially locked by the calling thread. If \a - lockedMutex is not in a locked state, this function returns - immediately. If \a lockedMutex is a recursive mutex, this function + lockedMutex is not in a locked state, the behavior is undefined. If + \a lockedMutex is a recursive mutex, this function returns immediately. The \a lockedMutex will be unlocked, and the calling thread will block until either of these conditions is met: -- cgit v1.2.3