rr

Name

rr -- Library initializing and other library wide functions.

Synopsis



#define     RR_ERROR
enum        RRError;
GQuark      rr_error_quark                  (void);
gboolean    rr_init                         (gint *argc,
                                             gchar ***argv,
                                             GError **error);
gboolean    rr_exit                         (GError **error);
gboolean    rr_quit                         (GError **error);
gboolean    rr_wait_until_done              (GError **error);
void        rr_main_work_pool_push          (RRWPGroup gid,
                                             GFunc func,
                                             gpointer data,
                                             gpointer user_data);
void        rr_main_work_pool_join          (RRWPGroup gid);
GMainContext* rr_get_main_context           (void);

Description

Details

RR_ERROR

#define RR_ERROR (rr_error_quark ())


enum RRError

typedef enum
{
	RR_ERROR_GETHOSTBYNAME,
	RR_ERROR_CONNECT,
	RR_ERROR_NOT_READY,
	RR_ERROR_OTHER
} RRError;


rr_error_quark ()

GQuark      rr_error_quark                  (void);


rr_init ()

gboolean    rr_init                         (gint *argc,
                                             gchar ***argv,
                                             GError **error);

Initializes RoadRunner and starts the event thread.


rr_exit ()

gboolean    rr_exit                         (GError **error);

Terminates the RoadRunner event thread and free the resources allocated by rr_init.


rr_quit ()

gboolean    rr_quit                         (GError **error);

Terminates the main loop. This will unblock rr_wait_until_done.


rr_wait_until_done ()

gboolean    rr_wait_until_done              (GError **error);

Blocks until the RoadRunner event loop is done. (when rr_quit is called).


rr_main_work_pool_push ()

void        rr_main_work_pool_push          (RRWPGroup gid,
                                             GFunc func,
                                             gpointer data,
                                             gpointer user_data);

Inserts func to the list of task to be executed by the roadrunner wide work pool. The work pool guarantees that two or more tasks with the same gid will never be executed in parallel.


rr_main_work_pool_join ()

void        rr_main_work_pool_join          (RRWPGroup gid);

blocks until all tasks in the roadrunner global work pool of the given gid are executed.


rr_get_main_context ()

GMainContext* rr_get_main_context           (void);