X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpool.cc;h=9a5e65332b4f18d24581876e843574a296b06c8f;hb=185b58f259d558651bc33b0b560c27fa613f4b3b;hp=bbe57b7ee291f423f53aef1fc83002eed9af0c56;hpb=a7d465fcb7254ad4acdf25208976802553c0f6a5;p=ardour.git diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc index bbe57b7ee2..9a5e65332b 100644 --- a/libs/pbd/pool.cc +++ b/libs/pbd/pool.cc @@ -26,6 +26,8 @@ #include "pbd/pool.h" #include "pbd/error.h" +#include "pbd/debug.h" +#include "pbd/compose.h" using namespace std; using namespace PBD; @@ -176,8 +178,7 @@ PerThreadPool::PerThreadPool () { { /* for some reason this appears necessary to get glib's thread private stuff to work */ - GPrivate* key; - key = g_private_new (NULL); + g_private_new (NULL); } _key = g_private_new (free_per_thread_pool); @@ -246,8 +247,10 @@ void* CrossThreadPool::alloc () { void* ptr; + + DEBUG_TRACE (DEBUG::Pool, string_compose ("%1 %2 has %3 pending free entries waiting\n", pthread_self(), name(), pending.read_space())); while (pending.read (&ptr, 1) == 1) { - cerr << name() << " pushes back a pending free list entry before allocating\n"; + DEBUG_TRACE (DEBUG::Pool, string_compose ("%1 %2 pushes back a pending free list entry before allocating\n", pthread_self(), name())); free_list.write (&ptr, 1); } return Pool::alloc ();