fix “no per-thread pool” abort
authorRobin Gareus <robin@gareus.org>
Tue, 10 Mar 2015 23:25:10 +0000 (00:25 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 10 Mar 2015 23:25:10 +0000 (00:25 +0100)
commitfe85575a12d8c81e8d2d08b7d91238a88c8febe7
treecfc272d4b291673cee546f0a3468f217be46eaef
parent1a5a48436a2b9627d640736603341e1b21fe45d9
fix “no per-thread pool” abort

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/ardour/session_events.cc
libs/pbd/pbd/pool.h
libs/pbd/pool.cc