void task_processor_thread_pool_put( task_processor_thread_pool* pool, task_processor_thread* thread ) { task_processor_thread** p = NULL; ASSERT( NULL != thread ); task_processor_thread_pause( thread ); synchronize_lock_mutex( pool->mutex ); if ( ARRAY_LIST_SIZE( &pool->threads ) < pool->max_size ) { p = (task_processor_thread**)array_list_push( &pool->threads ); if ( NULL != p ) { *p = thread; synchronize_unlock_mutex( pool->mutex ); return; } } task_processor_thread_destroy( thread ); object_pool_free( &pool->processor_thread_pool, thread ); synchronize_unlock_mutex( pool->mutex ); }
void array_push(Array * const list, Object obj) { array_list_push((ArrayList * const ) list, obj); }