AgsThreadPool

AgsThreadPool — thread pool

Functions

AgsThread * ags_thread_pool_pull ()
void ags_thread_pool_start ()
AgsThreadPool * ags_thread_pool_new ()

Types and Values

Includes

#include <ags/thread/ags_thread_pool.h>

Description

The AgsThreadPool acts as preinstantiated threads store. This can achieve enormeous performance.

Functions

ags_thread_pool_pull ()

AgsThread *
ags_thread_pool_pull (AgsThreadPool *thread_pool);

Pull a previously instantiated AgsReturnableThread. Note this function may block until a new thread is available.

Parameters

thread_pool

the AgsThreadPool

 

Returns

a new AgsThread

Since 0.4


ags_thread_pool_start ()

void
ags_thread_pool_start (AgsThreadPool *thread_pool);

Start the thread pool.

Parameters

thread_pool

the AgsThreadPool

 

Since 0.4


ags_thread_pool_new ()

AgsThreadPool *
ags_thread_pool_new (AgsThread *parent);

Create a new AgsThreadPool.

Parameters

parent

the parent AgsThread of returnable threads

 

Returns

the new AgsThreadPool

Since 0.4

Types and Values

enum AgsThreadPoolFlags

Members

AGS_THREAD_POOL_RUNNING

   

AGS_THREAD_POOL_READY