From fe85575a12d8c81e8d2d08b7d91238a88c8febe7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 11 Mar 2015 00:25:10 +0100 Subject: fix “no per-thread pool” abort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some backends the process thread can change (e.g. switch coreaudio headphone + internal speakers) If there are existing x-thread event calls this can lead to the following situation: 1) SessionEvent::operator new 2) audioengine process thread change 3) SessionEvent::operator delete -> crash, wrong thread SessionEvent::operator delete can safely push the event back to the pool for later cleanup.. --- libs/pbd/pbd/pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/pbd/pbd/pool.h') diff --git a/libs/pbd/pbd/pool.h b/libs/pbd/pbd/pool.h index 1c9ac81a3e..cfd782a794 100644 --- a/libs/pbd/pbd/pool.h +++ b/libs/pbd/pbd/pool.h @@ -128,7 +128,7 @@ class LIBPBD_API PerThreadPool const Glib::Threads::Private& key() const { return _key; } void create_per_thread_pool (std::string name, unsigned long item_size, unsigned long nitems); - CrossThreadPool* per_thread_pool (); + CrossThreadPool* per_thread_pool (bool must_exist = true); void set_trash (RingBuffer* t); void add_to_trash (CrossThreadPool *); -- cgit v1.2.3