BEGIN_C_DECLS axl_bool vortex_init_ctx ( VortexCtx ctx)

Context based vortex library init.

Allows to init the vortex library status on the provided context object (VortexCtx).

To init vortex library use:

1 VortexCtx * ctx;
3 // create an empty context
4 ctx = vortex_ctx_new ();
6 // init the context
7 if (! vortex_init_ctx (ctx)) {
8  printf ("failed to init the library..\n");
9 }
11 // do API calls before this function
13 // terminate the context
14 vortex_exit_exit (ctx);
16 // release the context
17 vortex_ctx_free (ctx);
ctxAn already created context where the library initialization will take place.
axl_true if the context was initialized, otherwise axl_false is returned.

NOTE: This function is not thread safe, that is, calling twice from different threads on the same object will cause improper results. You can use vortex_init_check to ensure if you already initialized the context.

References vortex_conf_get(), vortex_conf_set(), VORTEX_IO_WAIT_SELECT, vortex_io_waiting_get_current(), vortex_mutex_create(), VORTEX_SOFT_SOCK_LIMIT, vortex_support_add_search_path(), vortex_support_add_search_path_ref(), vortex_support_build_filename(), vortex_support_init(), vortex_thread_pool_get_num(), and vortex_thread_pool_init().