예제 #1
0
static void work_complete(void *cookie)
{
	char *task = cookie;

	printf("notification that work item %s is complete\n", task);

	item_count--;
	if (item_count == 3) {
		printf("putting pool\n");
		iv_work_pool_put(&pool);
	}
}
예제 #2
0
파일: iv_getaddrinfo.c 프로젝트: mc0de/dvpn
static void iv_getaddrinfo_task_complete(void *_igt)
{
	struct iv_getaddrinfo_task *igt = _igt;
	struct iv_getaddrinfo *ig;
	struct iv_getaddrinfo_thr_info *tinfo;

	ig = igt->ig;
	if (ig != NULL)
		ig->handler(ig->cookie, igt->ret, igt->res);
	else
		freeaddrinfo(igt->res);

	free(igt->node);
	free(igt->service);
	free(igt);

	tinfo = iv_tls_user_ptr(&iv_getaddrinfo_tls_user);
	if (!--tinfo->num_requests)
		iv_work_pool_put(&tinfo->pool);
}
예제 #3
0
void
main_loop_io_worker_deinit(void)
{
  iv_work_pool_put(&main_loop_io_workers);
}