1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #include "thread_safe.h"
- #include "core/error_macros.h"
- #include "core/os/memory.h"
- ThreadSafe::ThreadSafe() {
- mutex = Mutex::create();
- if (!mutex) {
- WARN_PRINT("THREAD_SAFE defined, but no default mutex type");
- }
- }
- ThreadSafe::~ThreadSafe() {
- if (mutex)
- memdelete(mutex);
- }
|