Mutex
Category: Core
Brief Description
A synchronization Mutex.
Member Functions
void | lock ( ) |
Error | try_lock ( ) |
void | unlock ( ) |
Description
A synchronization Mutex. Element used in multi-threadding. Basically a binary Semaphore. Guarantees that only one thread has this lock, can be used to protect a critical section.
Member Function Description
void lock ( )
Lock this Mutex, blocks until it is unlocked by the current owner.
Error try_lock ( )
Try locking this Mutex, does not block. Returns OK on success else ERR_BUSY.
void unlock ( )
Unlock this Mutex, leaving it to others threads.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_mutex.html