summaryrefslogtreecommitdiffstats
path: root/core/bind/core_bind.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-28 00:26:01 +0100
committerGitHub <noreply@github.com>2020-02-28 00:26:01 +0100
commitb7b39786840a41a057f531ed13b64e26366befac (patch)
treeb78a2e0bc0b3f49e82e148e8edb741930ff0ce55 /core/bind/core_bind.cpp
parente66d519286693a03bf59eaba0a5f29c1c9b15d64 (diff)
parent18fbdbb456c07a56b358bea2e392765fbcbb3283 (diff)
downloadredot-engine-b7b39786840a41a057f531ed13b64e26366befac.tar.gz
Merge pull request #36556 from RandomShaper/rework_mutex
Reimplement `Mutex` with C++'s `<mutex>` (plus more)
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r--core/bind/core_bind.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index c1cf061854..d9cc77feb3 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -2583,17 +2583,17 @@ _Semaphore::~_Semaphore() {
void _Mutex::lock() {
- mutex->lock();
+ mutex.lock();
}
Error _Mutex::try_lock() {
- return mutex->try_lock();
+ return mutex.try_lock();
}
void _Mutex::unlock() {
- mutex->unlock();
+ mutex.unlock();
}
void _Mutex::_bind_methods() {
@@ -2603,16 +2603,6 @@ void _Mutex::_bind_methods() {
ClassDB::bind_method(D_METHOD("unlock"), &_Mutex::unlock);
}
-_Mutex::_Mutex() {
-
- mutex = Mutex::create();
-}
-
-_Mutex::~_Mutex() {
-
- memdelete(mutex);
-}
-
///////////////
void _Thread::_start_func(void *ud) {