better thread leak reporting

This commit is contained in:
John Cupitt 2018-01-07 11:45:12 +00:00
parent 925667f8d3
commit 3fde3cf4ba
2 changed files with 4 additions and 4 deletions

View File

@ -511,7 +511,7 @@ vips_leak( void )
vips_error_buffer() );
if( vips__n_active_threads != 0 )
vips_buf_appendf( &buf, "threads: %d still active\n",
vips_buf_appendf( &buf, "threads: %d not joined\n",
vips__n_active_threads );
fprintf( stderr, "%s", vips_buf_all( &buf ) );

View File

@ -51,9 +51,9 @@
*/
/*
#define VIPS_DEBUG_RED
#define DEBUG_OUT_OF_THREADS
#define VIPS_DEBUG
#define VIPS_DEBUG_RED
*/
#ifdef HAVE_CONFIG_H
@ -242,8 +242,8 @@ vips_g_thread_new( const char *domain, GThreadFunc func, gpointer data )
thread = g_thread_create( vips_thread_run, info, TRUE, &error );
#endif
VIPS_DEBUG_MSG_RED( "vips_g_thread_new: g_thread_create() = %p\n",
thread );
VIPS_DEBUG_MSG_RED( "vips_g_thread_new: g_thread_create( %s ) = %p\n",
domain, thread );
#ifdef DEBUG_OUT_OF_THREADS
}