no longer need to clean up main buffers
thread-private buffers are now only on workers, no need to to start them up or free them on the main thread
This commit is contained in:
parent
75dee18848
commit
1a915db678
@ -133,7 +133,6 @@ int vips_mapfilerw( VipsImage * );
|
|||||||
int vips_remapfilerw( VipsImage * );
|
int vips_remapfilerw( VipsImage * );
|
||||||
|
|
||||||
void vips__buffer_init( void );
|
void vips__buffer_init( void );
|
||||||
void vips__buffer_shutdown( void );
|
|
||||||
|
|
||||||
void vips__copy_4byte( int swap, unsigned char *to, unsigned char *from );
|
void vips__copy_4byte( int swap, unsigned char *to, unsigned char *from );
|
||||||
void vips__copy_2byte( gboolean swap, unsigned char *to, unsigned char *from );
|
void vips__copy_2byte( gboolean swap, unsigned char *to, unsigned char *from );
|
||||||
|
@ -652,7 +652,7 @@ buffer_thread_destroy_notify( VipsBufferThread *buffer_thread )
|
|||||||
buffer_thread_free( buffer_thread );
|
buffer_thread_free( buffer_thread );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Init the buffer cache system.
|
/* Init the buffer cache system. This must only be called from worker threads.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips__buffer_init( void )
|
vips__buffer_init( void )
|
||||||
@ -671,6 +671,9 @@ vips__buffer_init( void )
|
|||||||
if( buffer_cache_max_reserve < 1 )
|
if( buffer_cache_max_reserve < 1 )
|
||||||
printf( "vips__buffer_init: buffer reserve disabled\n" );
|
printf( "vips__buffer_init: buffer reserve disabled\n" );
|
||||||
|
|
||||||
|
if( !vips_thread_isworker() )
|
||||||
|
printf( "vips__buffer_init: called for non-worker\n" );
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "vips__buffer_init: DEBUG enabled\n" );
|
printf( "vips__buffer_init: DEBUG enabled\n" );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
@ -680,13 +683,3 @@ vips__buffer_init( void )
|
|||||||
#endif /*DEBUG_CREATE*/
|
#endif /*DEBUG_CREATE*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
vips__buffer_shutdown( void )
|
|
||||||
{
|
|
||||||
VipsBufferThread *buffer_thread;
|
|
||||||
|
|
||||||
if( (buffer_thread = g_private_get( buffer_thread_key )) ) {
|
|
||||||
buffer_thread_free( buffer_thread );
|
|
||||||
g_private_set( buffer_thread_key, NULL );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -400,10 +400,6 @@ vips_init( const char *argv0 )
|
|||||||
vips_error_clear();
|
vips_error_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start up the buffer cache.
|
|
||||||
*/
|
|
||||||
vips__buffer_init();
|
|
||||||
|
|
||||||
/* Get the run-time compiler going.
|
/* Get the run-time compiler going.
|
||||||
*/
|
*/
|
||||||
vips_vector_init();
|
vips_vector_init();
|
||||||
@ -512,7 +508,6 @@ vips_leak( void )
|
|||||||
void
|
void
|
||||||
vips_thread_shutdown( void )
|
vips_thread_shutdown( void )
|
||||||
{
|
{
|
||||||
vips__buffer_shutdown();
|
|
||||||
vips__thread_profile_detach();
|
vips__thread_profile_detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user