void amf_call_function_asynchronous (async_func_t async_func, void *func_param)
{
	
	static poll_timer_handle async_func_timer_handle;
	poll_timer_add (aisexec_poll_handle, 0, func_param, async_func, 
		&async_func_timer_handle);
}
void amf_cluster_start (struct amf_cluster *cluster)
{
    /* wait a while before starting applications */
    poll_timer_add (aisexec_poll_handle,
                    cluster->saAmfClusterStartupTimeout,
                    cluster,
                    timer_function_cluster_startup_tmo,
                    &cluster->timeout_handle);
}
示例#3
0
static void send_some_more_messages_later (void)
{
	cpg_dispatch (cpg_handle, CS_DISPATCH_ALL);
	poll_timer_add (
		ta_poll_handle_get(),
		300, NULL,
		send_some_more_messages,
		&more_messages_timer_handle);
}
static void timer_function_cluster_startup_tmo (void *_cluster)
{
    struct amf_cluster *cluster = _cluster;
    struct amf_application *app;

    log_printf(LOG_NOTICE, "AMF Cluster: starting applications.");

    for (app = cluster->application_head; app != NULL; app = app->next) {
        amf_application_start (app, NULL);
    }

    /* wait a while before assigning workload */
    poll_timer_add (aisexec_poll_handle,
                    cluster->saAmfClusterStartupTimeout,
                    cluster,
                    timer_function_cluster_assign_workload_tmo,
                    &cluster->timeout_handle);
}