diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-26 17:58:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-26 17:58:28 +0300 |
commit | c9d4a0930b4206d736401ca6308ebfcb248d1c33 (patch) | |
tree | 708fbfd1717120638de9de0ef5ceb773e6589a03 /source/blender/blenlib | |
parent | dc27d31a2100c3272d0dbf293b24131eacaab962 (diff) | |
parent | be60e9b8c57223d102bb8b34f1dddc8c454b0ded (diff) |
Merge branch 'master' into 28
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/threads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 77da3be0600..abf611d1245 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -813,6 +813,11 @@ void BLI_begin_threaded_malloc(void) unsigned int level = atomic_fetch_and_add_u(&thread_levels, 1); if (level == 0) { MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread); + /* There is a little chance that two threads will meed to acces to a + * scheduler which was not yet created from main thread. which could + * cause scheduler created multiple times. + */ + BLI_task_scheduler_get(); } } |