Added check for whether thread lock is being removed while thread is using guarded alloc.

--
svn merge -r58788:58789 ^/branches/soc-2013-depsgraph_mt
This commit is contained in:
Sergey Sharybin
2013-08-19 10:38:27 +00:00
parent 9f7961b6b1
commit 018ab045e3

View File

@@ -280,6 +280,12 @@ static void mem_lock_thread(void)
static void mem_unlock_thread(void)
{
#ifdef DEBUG_THREADS
if (!pthread_equal(pthread_self(), mainid) && thread_lock_callback == NULL) {
assert(!"Thread lock was removed while allocation from thread is in progress");
}
#endif
if (thread_unlock_callback)
thread_unlock_callback();
}