MidgardPool

MidgardPool

Synopsis

                    MidgardPool;
guint               midgard_pool_get_max_n_resources    (MidgardPool *self);
MidgardPool *       midgard_pool_set_max_n_resources    (MidgardPool *self,
                                                         guint n_resources,
                                                         GError **error);
guint               midgard_pool_get_n_resources        (MidgardPool *self);
MidgardPool *       midgard_pool_push                   (MidgardPool *self,
                                                         GObject *object,
                                                         GError **error);

Object Hierarchy

  GInterface
   +----MidgardPool

Prerequisites

MidgardPool requires GObject.

Known Implementations

MidgardPool is implemented by MidgardExecutionPool.

Description

Details

MidgardPool

typedef struct _MidgardPool MidgardPool;


midgard_pool_get_max_n_resources ()

guint               midgard_pool_get_max_n_resources    (MidgardPool *self);

self :

MidgardPool instance

Returns :

maximum number of resources which can be available in the pool

Since 12.09


midgard_pool_set_max_n_resources ()

MidgardPool *       midgard_pool_set_max_n_resources    (MidgardPool *self,
                                                         guint n_resources,
                                                         GError **error);

Sets maximum number of resources which can be available in pool

self :

MidgardPool instance

n_resources :

number of resources

error :

pointer to store returned error

Returns :

MidgardPool self reference. [transfer none]

Since 12.09


midgard_pool_get_n_resources ()

guint               midgard_pool_get_n_resources        (MidgardPool *self);

self :

MidgardPool instance

Returns :

number of resources available in pool

Since 12.09


midgard_pool_push ()

MidgardPool *       midgard_pool_push                   (MidgardPool *self,
                                                         GObject *object,
                                                         GError **error);

Adds an object to pool

self :

MidgardPool instance

object :

GObject to add to pool

error :

pointer to store returned error

Returns :

MidgardPool self reference. [transfer none]

Since 12.09