From 3244eab5c50037a25efe87e6b06642c2d76df02e Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 6 Jul 2023 21:46:45 +0200 Subject: [PATCH] Fix docs for the write lock part of the RWLock, as it's not re-entrant. --- doc/classes/RWLock.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/classes/RWLock.xml b/doc/classes/RWLock.xml index 7a3d1463f..f6066f765 100644 --- a/doc/classes/RWLock.xml +++ b/doc/classes/RWLock.xml @@ -34,21 +34,20 @@ Locks this [RWLock] for write access, blocks until it is unlocked by the current owner. - [b]Note:[/b] This function returns without blocking if the thread already has ownership of the rwlock. + [b]Note:[/b] This function will deadlock if the thread already has ownership of the rwlock! Tries locking this [RWLock] for write access, but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise. - [b]Note:[/b] This function returns [constant OK] if the thread already has ownership of the rwlock. + [b]Note:[/b] This function returns [constant ERR_BUSY] if the thread already has ownership of the rwlock. Unlocks this [RWLock] for write access, leaving it to other threads. - [b]Note:[/b] If a thread called [method lock] or [method try_lock] multiple times while already having ownership of the rwlock, it must also call [method unlock] the same number of times in order to unlock it correctly.