From fb6f1aa12f945c6a17ca96f402dec2f6bce81463 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 14 Feb 2019 14:37:57 +0100 Subject: Fix Cycles Embree crash on macOS, due to too small thread stack size. --- intern/cycles/util/util_thread.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'intern/cycles/util/util_thread.h') diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h index 9ae9af25e6b..793d44130b6 100644 --- a/intern/cycles/util/util_thread.h +++ b/intern/cycles/util/util_thread.h @@ -41,8 +41,8 @@ typedef std::mutex thread_mutex; typedef std::unique_lock thread_scoped_lock; typedef std::condition_variable thread_condition_variable; -/* own pthread based implementation, to avoid boost version conflicts with - * dynamically loaded blender plugins */ +/* Own thread implementation similar to std::thread, so we can set a + * custom stack size on macOS. */ class thread { public: @@ -56,7 +56,11 @@ public: protected: function run_cb_; - std::thread thread_; +#ifdef __APPLE__ + pthread_t pthread_id; +#else + std::thread std_thread; +#endif bool joined_; int node_; }; -- cgit v1.2.3