mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 19:24:18 +00:00
Modernize Mutex
- Based on C++11's `mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS` - `BinaryMutex` added for special cases as the non-recursive version - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
This commit is contained in:
parent
b450036120
commit
4ddcdc031b
99 changed files with 472 additions and 1391 deletions
|
|
@ -53,7 +53,7 @@ class PluginScriptLanguage : public ScriptLanguage {
|
|||
const godot_pluginscript_language_desc _desc;
|
||||
godot_pluginscript_language_data *_data;
|
||||
|
||||
Mutex *_lock;
|
||||
Mutex _lock;
|
||||
SelfList<PluginScript>::List _script_list;
|
||||
|
||||
public:
|
||||
|
|
@ -126,7 +126,7 @@ public:
|
|||
void unlock();
|
||||
|
||||
PluginScriptLanguage(const godot_pluginscript_language_desc *desc);
|
||||
virtual ~PluginScriptLanguage();
|
||||
virtual ~PluginScriptLanguage() {}
|
||||
};
|
||||
|
||||
#endif // PLUGINSCRIPT_LANGUAGE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue